--- alx-src/trunk/alxconfig-ng/init.d/alxsettings 2005/08/17 21:19:52 282 +++ alx-src/trunk/alxconfig-ng/init.d/alxsettings 2005/08/18 07:39:00 295 @@ -11,7 +11,7 @@ #%before: #%after: -# $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 $ # checks first if the client was already configured and if it has an valid serial # if not it runs the autoconfiguration script @@ -88,9 +88,16 @@ then source /etc/alxconfig-ng/serial - # doing this now before this function gets called # start preliminary networking (dhcp) - # preliminary_network start + 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 CUR_IP=$(/sbin/ifconfig eth0 | sed -n '/addr:/s/ [^r]*..//gp') CUR_MAC=$(/sbin/ifconfig eth0 | grep HWaddr | cut -d ' ' -f11) @@ -115,7 +122,7 @@ echo if [ -f /hardware-auto-detection ] then - echo -e ${COLMAGENTA}"Hardware-Auto-Detection forced by system-administrator"${COLDEFAULT} + echo -e ${COLMAGENTA}"Hardware autodetection forced by system-administrator"${COLDEFAULT} else echo -e ${COLMAGENTA}"Preparing system for first boot"${COLDEFAULT} fi @@ -134,6 +141,14 @@ # 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 + CUR_IP=$(/sbin/ifconfig eth0 | sed -n '/addr:/s/ [^r]*..//gp') CUR_MAC=$(/sbin/ifconfig eth0 | grep HWaddr | cut -d ' ' -f11) CUR_MTIME=$(date +%s) @@ -449,8 +464,6 @@ chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME} chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox - chmod 0755 ${ALX_UNPRIV_HOME}/.idesktop - chmod 0644 ${ALX_UNPRIV_HOME}/.ideskrc # default passwords are bad #usermod -p $(perl -e "printf(crypt('foobar','AD'))") root @@ -523,17 +536,6 @@ case $1 in 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 - # retrieve or validate current serial get_system_serial if [[ ${ALX_HW_DETECT} = true ]]