20 |
mecho " Prints the current netboot state." |
mecho " Prints the current netboot state." |
21 |
} |
} |
22 |
|
|
23 |
|
help_version_deactivated() |
24 |
|
{ |
25 |
|
mecho "get version.deactivated" |
26 |
|
mecho " Shows the current state of the system." |
27 |
|
mecho |
28 |
|
mecho "set version.deactivated [0|1]" |
29 |
|
mecho " Sets the state of the system." |
30 |
|
} |
31 |
|
|
32 |
get_version_os() |
get_version_os() |
33 |
{ |
{ |
34 |
local version |
local version |
83 |
|
|
84 |
rvecho "${netboot}" |
rvecho "${netboot}" |
85 |
} |
} |
86 |
|
|
87 |
|
get_version_deactivated() |
88 |
|
{ |
89 |
|
local deactivated=0 |
90 |
|
[[ -e ${MCORE_CONFIG_PATH}/client-deactivated ]] && deactivated=1 |
91 |
|
rvecho "${deactivated}" |
92 |
|
} |
93 |
|
|
94 |
|
set_version_deactivated() |
95 |
|
{ |
96 |
|
local deactivated="${CLASS_ARGV[0]}" |
97 |
|
case "${deactivated}" in |
98 |
|
0) if [[ -e ${MCORE_CONFIG_PATH}/client-deactivated ]] |
99 |
|
then |
100 |
|
rm ${MCORE_CONFIG_PATH}/client-deactivated |
101 |
|
fi |
102 |
|
rvecho "Client activated" |
103 |
|
;; |
104 |
|
|
105 |
|
1) if [[ ! -e ${MCORE_CONFIG_PATH}/client-deactivated ]] |
106 |
|
then |
107 |
|
touch ${MCORE_CONFIG_PATH}/client-deactivated |
108 |
|
fi |
109 |
|
rvecho "Client deactivated" |
110 |
|
;; |
111 |
|
|
112 |
|
*) decho "Unknown state '${deactivated}'" |
113 |
|
help_version_deactivated |
114 |
|
;; |
115 |
|
esac |
116 |
|
} |