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 2701 by niro, Wed Dec 16 14:11:07 2015 UTC revision 2702 by niro, Thu Dec 17 12:02:10 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()
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
# Line 74  get_version_netboot() Line 83  get_version_netboot()
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    }

Legend:
Removed from v.2701  
changed lines
  Added in v.2702