Magellan Linux

Diff of /alx-src/trunk/alxconfig-ng/init.d/alxsettings

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

revision 294 by niro, Wed Aug 17 21:19:52 2005 UTC revision 295 by niro, Thu Aug 18 07:39:00 2005 UTC
# Line 11  Line 11 
11  #%before:  #%before:
12  #%after:  #%after:
13    
14  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsettings,v 1.15 2005-08-17 21:19:52 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsettings,v 1.16 2005-08-18 07:39:00 niro Exp $
15    
16  # checks first if the client was already configured and if it has an valid serial  # checks first if the client was already configured and if it has an valid serial
17  # if not it runs the autoconfiguration script  # if not it runs the autoconfiguration script
# Line 88  get_system_serial(){ Line 88  get_system_serial(){
88   then   then
89   source /etc/alxconfig-ng/serial   source /etc/alxconfig-ng/serial
90    
  # doing this now before this function gets called  
91   # start preliminary networking (dhcp)   # start preliminary networking (dhcp)
92   # preliminary_network start   preliminary_network start
93    
94     # check if mysql server is reachable
95     # if not abort this script
96     if ! reach_mysql_server
97     then
98     preliminary_network stop
99     exit 1
100     fi
101    
102   CUR_IP=$(/sbin/ifconfig eth0 | sed -n '/addr:/s/ [^r]*..//gp')   CUR_IP=$(/sbin/ifconfig eth0 | sed -n '/addr:/s/ [^r]*..//gp')
103   CUR_MAC=$(/sbin/ifconfig eth0 | grep HWaddr | cut -d ' ' -f11)   CUR_MAC=$(/sbin/ifconfig eth0 | grep HWaddr | cut -d ' ' -f11)
# Line 115  get_system_serial(){ Line 122  get_system_serial(){
122   echo   echo
123   if [ -f /hardware-auto-detection ]   if [ -f /hardware-auto-detection ]
124   then   then
125   echo -e ${COLMAGENTA}"Hardware-Auto-Detection forced by system-administrator"${COLDEFAULT}   echo -e ${COLMAGENTA}"Hardware autodetection forced by system-administrator"${COLDEFAULT}
126   else   else
127   echo -e ${COLMAGENTA}"Preparing system for first boot"${COLDEFAULT}   echo -e ${COLMAGENTA}"Preparing system for first boot"${COLDEFAULT}
128   fi   fi
# Line 134  get_system_serial(){ Line 141  get_system_serial(){
141   # start preliminary networking (dhcp)   # start preliminary networking (dhcp)
142   preliminary_network start   preliminary_network start
143    
144     # check if mysql server is reachable
145     # if not abort this script
146     if ! reach_mysql_server
147     then
148     preliminary_network stop
149     exit 1
150     fi
151    
152   CUR_IP=$(/sbin/ifconfig eth0 | sed -n '/addr:/s/ [^r]*..//gp')   CUR_IP=$(/sbin/ifconfig eth0 | sed -n '/addr:/s/ [^r]*..//gp')
153   CUR_MAC=$(/sbin/ifconfig eth0 | grep HWaddr | cut -d ' ' -f11)   CUR_MAC=$(/sbin/ifconfig eth0 | grep HWaddr | cut -d ' ' -f11)
154   CUR_MTIME=$(date +%s)   CUR_MTIME=$(date +%s)
# Line 449  import_settings_local(){ Line 464  import_settings_local(){
464   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}
465   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox
466   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox
  chmod 0755 ${ALX_UNPRIV_HOME}/.idesktop  
  chmod 0644 ${ALX_UNPRIV_HOME}/.ideskrc  
467    
468   # default passwords are bad   # default passwords are bad
469   #usermod -p $(perl -e "printf(crypt('foobar','AD'))") root   #usermod -p $(perl -e "printf(crypt('foobar','AD'))") root
# Line 523  preliminary_network(){ Line 536  preliminary_network(){
536    
537  case $1 in  case $1 in
538   start)   start)
  # start preliminary networking (dhcp)  
  preliminary_network start  
   
  # check if mysql server is reachable  
  # if not abort this script  
  if ! reach_mysql_server  
  then  
  preliminary_network stop  
  exit 1  
  fi  
   
539   # retrieve or validate current serial   # retrieve or validate current serial
540   get_system_serial   get_system_serial
541   if [[ ${ALX_HW_DETECT} = true ]]   if [[ ${ALX_HW_DETECT} = true ]]

Legend:
Removed from v.294  
changed lines
  Added in v.295