Magellan Linux

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

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

revision 1975 by niro, Sat May 7 11:06:33 2011 UTC revision 2123 by niro, Mon May 16 11:16:58 2011 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # $Id$  # $Id$
3    
4  #%rlevels: 3:s 4:s 5:s 0:k 6:k  #%rlevels: 3:s 0:k
5  #%start: 99  #%start: 99
6  #%stop: 01  #%stop: 01
7    
# Line 69  set_current_network_state() Line 69  set_current_network_state()
69   # nice status   # nice status
70   $CURS_UP   $CURS_UP
71   $SET_WCOL   $SET_WCOL
72   echo "[ U, State: ${ALX_STATE} ]"   echo "[ SN: ${ALX_SERIAL}, U, ${ALX_STATE} ]"
73    
74   mysqldo "update state_connected set   mysqldo "update state_connected set
75   hostname='${HOSTNAME}',   hostname='${HOSTNAME}',
# Line 84  set_current_network_state() Line 84  set_current_network_state()
84   # nice status   # nice status
85   $CURS_UP   $CURS_UP
86   $SET_WCOL   $SET_WCOL
87   echo "[ N, State: ${ALX_STATE} ]"   echo "[ SN: ${ALX_SERIAL}, N, ${ALX_STATE} ]"
88    
89   mysqldo "insert into state_connected(   mysqldo "insert into state_connected(
90   serial,   serial,
# Line 118  unset_alx_connected() Line 118  unset_alx_connected()
118    
119   echo -e ${COLMAGENTA}"Unregister system from database"${COLDEFAULT}   echo -e ${COLMAGENTA}"Unregister system from database"${COLDEFAULT}
120    
121     # nice status
122     $CURS_UP
123     $SET_WCOL
124     echo "[ SN: ${ALX_SERIAL} ]"
125    
126   mysqldo "delete from state_connected where serial='${ALX_SERIAL}' and mac='${CUR_MAC}';"   mysqldo "delete from state_connected where serial='${ALX_SERIAL}' and mac='${CUR_MAC}';"
127   evaluate_retval   evaluate_retval
128  }  }

Legend:
Removed from v.1975  
changed lines
  Added in v.2123