Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/basic-version/version.client.class.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2703 by niro, Thu Dec 17 12:02:10 2015 UTC revision 2704 by niro, Thu Dec 17 12:31:44 2015 UTC
# Line 20  help_version_netboot() Line 20  help_version_netboot()
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    
# Line 84  get_version_netboot() Line 84  get_version_netboot()
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
# Line 110  set_version_deactivated() Line 110  set_version_deactivated()
110   ;;   ;;
111    
112   *) decho "Unknown state '${deactivated}'"   *) decho "Unknown state '${deactivated}'"
113   help_version_deactivated   help_version_activated
114   ;;   ;;
115   esac   esac
116  }  }

Legend:
Removed from v.2703  
changed lines
  Added in v.2704