From 20e6cbeade20a51dd867ad10baf32fb2aff8ee73 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Tue, 13 Jan 2009 12:20:19 +0000 Subject: Moving WLAN related stuff out of mainline stage3 (as suggested by zooey). git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2471 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/stage3-stuff/init | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'initramfs/stage3-stuff/init') diff --git a/initramfs/stage3-stuff/init b/initramfs/stage3-stuff/init index c6c7348c..f2ba45a5 100755 --- a/initramfs/stage3-stuff/init +++ b/initramfs/stage3-stuff/init @@ -74,8 +74,8 @@ export SLXVERSION="${slxconf_slxver}" # do not use dnbd cache file nodnbdcache="yes" -# set a default LAN interface, might be modified for WLAN or on machines with -# more than one ethernet card built in +# set a default LAN interface, might be modified for WLAN, bridge setups or +# on machines with more than one ethernet card built in nwif="eth0" # load usb modules for keyboard (reenable usb keyboards, otherwise the @@ -167,11 +167,6 @@ in $0\ncountry=\"${COUNTRY}\"" >>/etc/initramfs-setup #logread -f >> /var/log/messages 2>/dev/null & fi ;; - # essid for WLAN boot (experimental, might be moved to a module component - # in later versions - essid=*) - essid=${opts#essid=} - ;; # if configuration should not be gathered by dhcp client nodhcp) nodhcp="yes" @@ -365,16 +360,11 @@ else LOGFILE="/dev/null" fi -# check for WLAN specific settings and check for multiple ethernet interfaces -# (we have at least the mac of PXE boot in bootmac) -if [ -n "${essid}" ] ; then - # WLAN setup will most probably change the network interface name stored in - # nwif (to wlan0 or something like that) - wlanlinksetup - #echo "Starting shell for testing of WLAN setup procedure" - #/bin/ash -else - # check here for the active ethernet link +runinithook '10-nw-if-config' +# check for multiple ethernet interfaces (we have at least the mac of PXE boot +# device in $bootmac) +# check here for the active ethernet link (skip non-ethN interfaces) +if strinstr "eth" "$nwif" ; then for ethif in eth0 eth1 eth2 eth3 ; do macaddr=$(ip link show dev $ethif 2>/dev/null | \ sed -n "/ether [0-9e-f]\{2\}:.*/p" | sed -e "s/.*ether //;s/ .*//") -- cgit v1.2.3-55-g7522