Magellan Linux

Diff of /alx-src/branches/alxconf-060/init.d/alxsetstate

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

revision 222 by niro, Tue Mar 8 23:02:49 2005 UTC revision 274 by niro, Wed May 11 12:25:39 2005 UTC
# Line 9  Line 9 
9  #%before:  #%before:
10  #%after:  #%after:
11    
12  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsetstate,v 1.2 2005-03-08 23:02:49 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsetstate,v 1.6 2005-05-11 12:25:39 niro Exp $
13    
14  source /etc/sysconfig/rc  source /etc/sysconfig/rc
15  source $rc_functions  source $rc_functions
16    
17  #mysql settings  #mysql settings
18  source /etc/alx-config/config.rc  source /etc/alxconfig-ng/config.rc
19  source /opt/alx-config/functions/mysqlfunctions  source /usr/lib/alxconfig-ng/functions/mysqlfunctions
20  source /opt/alx-config/functions/alx-mysql-functions  source /usr/lib/alxconfig-ng/functions/serial_functions
21    
22  #check if mysql is available  #check if mysql is available
23  [ -x /usr/bin/mysql ] && MYSQL_ALX=true  [ -x /usr/bin/mysql ] && MYSQL_ALX=true
# Line 29  ALX_HW_DETECT=false Line 29  ALX_HW_DETECT=false
29  unset ALX_SERIAL ALX_STATE  unset ALX_SERIAL ALX_STATE
30    
31  #get current system state  #get current system state
32  if [ -f /etc/alx-config/state/state ]  if [ -f /etc/alxconfig-ng/state/state ]
33  then  then
34   source /etc/alx-config/state/state   source /etc/alxconfig-ng/state/state
35  else  else
36   ALX_STATE=error   ALX_STATE=error
37  fi  fi
# Line 113  set_current_network_state(){ Line 113  set_current_network_state(){
113  # nice name is alx_connected_state or sth like this  # nice name is alx_connected_state or sth like this
114  unset_alx_connected(){  unset_alx_connected(){
115   local SQL_OPTS   local SQL_OPTS
116     local CUR_MAC
117    
118     CUR_MAC=$(/sbin/ifconfig eth0 | grep HWaddr | cut -d ' ' -f11)
119    
120   echo -e ${COLMAGENTA}"Unregister system from database"${COLDEFAULT}   echo -e ${COLMAGENTA}"Unregister system from database"${COLDEFAULT}
121    
# Line 124  unset_alx_connected(){ Line 127  unset_alx_connected(){
127  ########### starts here ################  ########### starts here ################
128    
129  #first of all get current system serial  #first of all get current system serial
130  if [ -f /etc/alx-config/serial ]  if [ -f /etc/alxconfig-ng/serial ]
131  then  then
132   source /etc/alx-config/serial   source /etc/alxconfig-ng/serial
133  else  else
134   ALX_SERIAL=0   ALX_SERIAL=0
135  fi  fi
# Line 144  case $1 in Line 147  case $1 in
147   *)   *)
148   echo "Usage: $0 {start|stop} ..."   echo "Usage: $0 {start|stop} ..."
149   ;;   ;;
 esac  
150    esac

Legend:
Removed from v.222  
changed lines
  Added in v.274