Magellan Linux

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

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

alx-src/trunk/alxconfig-ng/init.d/alxsetstate revision 347 by niro, Sun Oct 9 21:35:27 2005 UTC alx-src/branches/alxconf-060/init.d/alxsetstate revision 1975 by niro, Sat May 7 11:06:33 2011 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    # $Id$
3    
4  #%rlevels: 3:s 4:s 5:s 0:k 6:k  #%rlevels: 3:s 4:s 5:s 0:k 6:k
5  #%start: 99  #%start: 99
# Line 9  Line 10 
10  #%before:  #%before:
11  #%after:  #%after:
12    
13  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsetstate,v 1.9 2005-10-09 21:35:27 niro Exp $  source /etc/conf.d/rc
   
 source /etc/sysconfig/rc  
14  source $rc_functions  source $rc_functions
15    
16  # mysql settings  # mysql settings
# Line 19  source /etc/alxconfig-ng/config.rc Line 18  source /etc/alxconfig-ng/config.rc
18  source /usr/lib/alxconfig-ng/functions/mysqlfunctions  source /usr/lib/alxconfig-ng/functions/mysqlfunctions
19  source /usr/lib/alxconfig-ng/functions/serial_functions  source /usr/lib/alxconfig-ng/functions/serial_functions
20    
 # check if mysql is available  
 [ -x /usr/bin/mysql ] && MYSQL_ALX=true  
   
 # other needed vars  
 ALX_HW_DETECT=false  
   
21  # unset vars which may kill us  # unset vars which may kill us
22  unset ALX_SERIAL ALX_STATE ALX_IFACE  unset ALX_SERIAL ALX_STATE ALX_IFACE
23    
# Line 36  else Line 29  else
29   ALX_STATE=error   ALX_STATE=error
30  fi  fi
31    
32    if [ -f ${SETTINGSPATH}/confd-networking ]
33    then
34     ALX_IFACE="$(< ${SETTINGSPATH}/confd-networking)"
35    fi
36  [[ -z ${ALX_IFACE} ]] && export ALX_IFACE=eth0  [[ -z ${ALX_IFACE} ]] && export ALX_IFACE=eth0
37    
38  # need to put this to an extra init script which will be  # need to put this to an extra init script which will be
# Line 56  set_current_network_state() Line 53  set_current_network_state()
53   then   then
54   # abort on non valid serial   # abort on non valid serial
55   ALX_STATE="invalid serial"   ALX_STATE="invalid serial"
56   echo "ALX_STATE=${ALX_STATE}" > /etc/alxconfig-ng/state/state   echo "ALX_STATE=\"${ALX_STATE}\"" > /etc/alxconfig-ng/state/state
57   show_invalid_serial_msg   show_invalid_serial_msg
58   exit 1   exit 1
59   fi   fi

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