Magellan Linux

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

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

alx-src/branches/alxconf_20060908/init.d/alxsettings revision 1596 by niro, Thu Dec 2 15:19:15 2010 UTC alx-src/branches/alxconf-060/init.d/alxsettings revision 1800 by niro, Thu Apr 14 19:29:35 2011 UTC
# Line 143  get_system_serial() Line 143  get_system_serial()
143   else   else
144   # abort on non valid serial   # abort on non valid serial
145   ALX_STATE="invalid serial"   ALX_STATE="invalid serial"
146   echo "ALX_STATE=${ALX_STATE}" > /etc/alxconfig-ng/state/state   echo "ALX_STATE=\"${ALX_STATE}\"" > /etc/alxconfig-ng/state/state
147   show_invalid_serial_msg   show_invalid_serial_msg
148   exit 1   exit 1
149   fi   fi
# Line 154  get_system_serial() Line 154  get_system_serial()
154   if [[ ${ALX_FORCED_RECHECK} = true ]]   if [[ ${ALX_FORCED_RECHECK} = true ]]
155   then   then
156   echo -e ${COLMAGENTA}"Hardware autodetection forced by system-administrator"${COLDEFAULT}   echo -e ${COLMAGENTA}"Hardware autodetection forced by system-administrator"${COLDEFAULT}
157     # always disable CONFD_NETWORKING here
158     export ALX_CONFD_NETWORKING="false"
159   else   else
160   echo -e ${COLMAGENTA}"Preparing system for first boot"${COLDEFAULT}   echo -e ${COLMAGENTA}"Preparing system for first boot"${COLDEFAULT}
161   fi   fi
# Line 209  get_system_serial() Line 211  get_system_serial()
211   fi   fi
212    
213   # write current state to temp file   # write current state to temp file
214   echo "ALX_STATE=${ALX_STATE}" > /etc/alxconfig-ng/state/state   echo "ALX_STATE=\"${ALX_STATE}\"" > /etc/alxconfig-ng/state/state
215   [ -f /hardware-auto-detection ] && rm /hardware-auto-detection   [ -f /hardware-auto-detection ] && rm /hardware-auto-detection
216    
217   # now export ALX_FORCED_RECHECK=true   # now export ALX_FORCED_RECHECK=true
# Line 234  get_system_serial() Line 236  get_system_serial()
236   # set ALX_STATE to ok so everybody knows that everything was ok   # set ALX_STATE to ok so everybody knows that everything was ok
237   ALX_STATE=ok   ALX_STATE=ok
238    
239   echo "ALX_SERIAL=${ALX_SERIAL}" > /etc/alxconfig-ng/serial   echo "ALX_SERIAL=\"${ALX_SERIAL}\"" > /etc/alxconfig-ng/serial
240   echo "ALX_REG_DATE=${CUR_MTIME}" >> /etc/alxconfig-ng/serial   echo "ALX_REG_DATE=\"${CUR_MTIME}\"" >> /etc/alxconfig-ng/serial
241    
242   evaluate_retval   evaluate_retval
243   else   else
# Line 254  get_system_serial() Line 256  get_system_serial()
256   fi   fi
257    
258   # write current state to temp file   # write current state to temp file
259   echo "ALX_STATE=${ALX_STATE}" > /etc/alxconfig-ng/state/state   echo "ALX_STATE=\"${ALX_STATE}\"" > /etc/alxconfig-ng/state/state
260   echo "ALX_IFACE=${ALX_IFACE}" >> /etc/alxconfig-ng/state/state   echo "ALX_IFACE=\"${ALX_IFACE}\"" >> /etc/alxconfig-ng/state/state
261  }  }
262    
263    
# Line 566  import_settings_local() Line 568  import_settings_local()
568   #[ ! -d ${SETTINGSPATH} ] && install -d ${SETTINGSPATH}   #[ ! -d ${SETTINGSPATH} ] && install -d ${SETTINGSPATH}
569   #echo "${NETCARD_DRIVER}" > ${SETTINGSPATH}/modules   #echo "${NETCARD_DRIVER}" > ${SETTINGSPATH}/modules
570    
571   # set an device alias for modprobe.conf   # set an device alias for modprobe.conf and modules.conf
572   [ ! -d /etc/modules.d ] && install -d /etc/modules.d   [ ! -d /etc/modules.d ] && install -d /etc/modules.d
573     [ ! -d /etc/modprobe.d ] && install -d /etc/modprobe.d
574   echo "alias eth0 ${NETCARD_DRIVER}" > /etc/modules.d/net.eth0   echo "alias eth0 ${NETCARD_DRIVER}" > /etc/modules.d/net.eth0
575     echo "alias eth0 ${NETCARD_DRIVER}" > /etc/modprobe.d/net.eth0
576    
577   # regenerate modprobe.conf   # regenerate modprobe.conf
578   [ -x $(which modules-update) ] && modules-update || echo "cannot regen modprobe.conf"   [ -x $(which modules-update) ] && modules-update || echo "cannot regen modprobe.conf"
# Line 578  import_settings_local() Line 582  import_settings_local()
582   # set system state to 'already configured'   # set system state to 'already configured'
583   touch /etc/alxconfig-ng/state/configured   touch /etc/alxconfig-ng/state/configured
584    
585     # install slim desktopmanager configuration
586     config_display_manager
587    
588   # if only an recheck was forced than abort now   # if only an recheck was forced than abort now
589   [[ ${ALX_FORCED_RECHECK} = true ]] && return 0   [[ ${ALX_FORCED_RECHECK} = true ]] && return 0
590    
# Line 665  import_settings_local() Line 672  import_settings_local()
672  preliminary_network()  preliminary_network()
673  {  {
674   local module   local module
675     local modulesconf
676    
677   if [ -f /etc/alxconfig-ng/state/configured ]   if [ -f /etc/alxconfig-ng/state/configured ]
678   then   then
# Line 675  preliminary_network() Line 683  preliminary_network()
683   module=$(cat ${SETTINGSPATH}/modules)   module=$(cat ${SETTINGSPATH}/modules)
684   modprobe ${module}   modprobe ${module}
685   fi   fi
686    
687     # check modprobe.conf
688     if [[ $(kernel_major_version) = 2.4 ]]
689     then
690     modulesconf="/etc/modules.conf"
691     else
692     modulesconf="/etc/modprobe.conf"
693     fi
694     if [[ -z $(grep eth0 ${modulesconf}) ]]
695     then
696     /sbin/modules-update force
697     fi
698   else   else
699   # vars used by hwdetect   # vars used by hwdetect
700   local NETCARD_FULLNAME NETCARD_DRIVER MOUSE_FULLNAME MOUSE_DEVICE SOUND_FULLNAME   local NETCARD_FULLNAME NETCARD_DRIVER MOUSE_FULLNAME MOUSE_DEVICE SOUND_FULLNAME

Legend:
Removed from v.1596  
changed lines
  Added in v.1800