--- alx-src/branches/alxconf_20060908/init.d/alxsettings 2011/01/25 09:36:42 1715 +++ alx-src/branches/alxconf-060/init.d/alxsettings 2011/05/09 15:35:49 2008 @@ -1,8 +1,8 @@ #!/bin/bash - +# $Id$ # -#%rlevels: 7:s 0:k 6:k +#%rlevels: 7:s 0:k #%start: 41 #%stop: 01 @@ -11,8 +11,6 @@ #%before: #%after: -# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsettings,v 1.27 2005-10-11 12:10:15 niro Exp $ - # checks first if the client was already configured and if it has an valid serial # if not it runs the autoconfiguration script # these settings will be used for client setup @@ -21,7 +19,7 @@ # if no changes are at server side they will be kept, if yes the get updated. # the server settings has higher priority. -source /etc/sysconfig/rc +source /etc/conf.d/rc source $rc_functions # mysql settings @@ -39,9 +37,6 @@ source /usr/lib/alxconfig-ng/functions/config_ssh_auth source /usr/lib/alxconfig-ng/functions/config_versions -# check if mysql is available -[ -x /usr/bin/mysql ] && MYSQL_ALX=true - # other needed vars ALX_HW_DETECT=false ALX_FORCED_RECHECK=false @@ -126,8 +121,8 @@ exit 1 fi - CUR_IP=$(/sbin/ifconfig ${ALX_IFACE} | sed -n '/addr:/s/ [^r]*..//gp') - CUR_MAC=$(/sbin/ifconfig ${ALX_IFACE} | grep HWaddr | cut -d ' ' -f11) + CUR_IP=$(ifconfig ${ALX_IFACE} | sed -n '/addr:/s/ [^r]*..//gp') + CUR_MAC=$(ifconfig ${ALX_IFACE} | grep HWaddr | cut -d ' ' -f11) CUR_MTIME=$(date +%s) echo -e ${COLOREDSTAR} "Trying to validate my serial ..." @@ -288,8 +283,8 @@ local MOUSETYPE XMOUSETYPE FULLNAME DEVICE # get setting from hwdetect - source /etc/sysconfig/hwsetup/knoppix - source /etc/sysconfig/hwsetup/mouse + source /etc/conf.d/hwsetup/knoppix + source /etc/conf.d/hwsetup/mouse echo echo -e ${COLMAGENTA}"Importing detected settings to database"${COLDEFAULT} @@ -461,8 +456,8 @@ local MOUSETYPE XMOUSETYPE FULLNAME DEVICE # get setting from hwdetect - source /etc/sysconfig/hwsetup/knoppix - source /etc/sysconfig/hwsetup/mouse + source /etc/conf.d/hwsetup/knoppix + source /etc/conf.d/hwsetup/mouse echo echo -e ${COLMAGENTA}"Updating detected settings in database"${COLDEFAULT} @@ -558,7 +553,7 @@ local MOUSETYPE XMOUSETYPE FULLNAME DEVICE # get setting from hwdetect - source /etc/sysconfig/hwsetup/knoppix + source /etc/conf.d/hwsetup/knoppix echo echo -e ${COLMAGENTA}"Importing detected settings to local system"${COLDEFAULT} @@ -583,11 +578,7 @@ touch /etc/alxconfig-ng/state/configured # install slim desktopmanager configuration - cat ${ALX_SKELETONS}/slim/slim.conf > /etc/slim.conf - sed -i "s:@@USERNAME@@:${ALX_UNPRIV_USER}:" /etc/slim.conf - - # install a sane xinitrc - echo "exec startfluxbox" > ${ALX_UNPRIV_HOME}/.xinitrc + config_display_manager # if only an recheck was forced than abort now [[ ${ALX_FORCED_RECHECK} = true ]] && return 0 @@ -676,6 +667,7 @@ preliminary_network() { local module + local modulesconf if [ -f /etc/alxconfig-ng/state/configured ] then @@ -686,13 +678,25 @@ module=$(cat ${SETTINGSPATH}/modules) modprobe ${module} fi + + # check modprobe.conf + if [[ $(kernel_major_version) = 2.4 ]] + then + modulesconf="/etc/modules.conf" + else + modulesconf="/etc/modprobe.conf" + fi + if [[ -z $(grep eth0 ${modulesconf}) ]] + then + modules-update force + fi else # vars used by hwdetect local NETCARD_FULLNAME NETCARD_DRIVER MOUSE_FULLNAME MOUSE_DEVICE SOUND_FULLNAME local SOUND_DRIVER XSERVER XMODULE XDESC FLOPPY_FULLNAME FLOPPY_DEVICE FLOPPY_DRIVER # get setting from hwdetect - source /etc/sysconfig/hwsetup/knoppix + source /etc/conf.d/hwsetup/knoppix modprobe ${NETCARD_DRIVER} fi