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