summaryrefslogtreecommitdiffstats
path: root/initramfs
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-01-13 13:20:19 +0100
committerDirk von Suchodoletz2009-01-13 13:20:19 +0100
commit20e6cbeade20a51dd867ad10baf32fb2aff8ee73 (patch)
tree7441c1467ee4109556f340a8af9fd289023d8d37 /initramfs
parentAddition, fix for tablet (wacom) detection ... (diff)
downloadcore-20e6cbeade20a51dd867ad10baf32fb2aff8ee73.tar.gz
core-20e6cbeade20a51dd867ad10baf32fb2aff8ee73.tar.xz
core-20e6cbeade20a51dd867ad10baf32fb2aff8ee73.zip
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
Diffstat (limited to 'initramfs')
-rw-r--r--initramfs/stage3-stuff/etc/functions15
-rw-r--r--initramfs/stage3-stuff/etc/messages3
-rw-r--r--initramfs/stage3-stuff/etc/messages.de3
-rwxr-xr-xinitramfs/stage3-stuff/init24
4 files changed, 7 insertions, 38 deletions
diff --git a/initramfs/stage3-stuff/etc/functions b/initramfs/stage3-stuff/etc/functions
index bafd53b4..bd9a112d 100644
--- a/initramfs/stage3-stuff/etc/functions
+++ b/initramfs/stage3-stuff/etc/functions
@@ -170,21 +170,6 @@ else
fi
}
#############################################################################
-# definition of wlan interface name and wireless connect
-wlanlinksetup () {
-local wlanif=$(iwconfig 2>/dev/null|sed -n "/ESSID:/p"|sed "s/ .*//")
-if [ -n "$if" ] ; then
- ip link set dev ${wlanif} up
- if iwconfig ${wlanif} mode managed essid "${essid}"; then
- nwif=${wlanif}
- else
- error "$init_nowlan"
- fi
-else
- error "$init_nowlan"
-fi
-}
-#############################################################################
# replacement for which command to find executables inside stage4 rootfs
binfinder()
{
diff --git a/initramfs/stage3-stuff/etc/messages b/initramfs/stage3-stuff/etc/messages
index c244c9c0..7f6ed647 100644
--- a/initramfs/stage3-stuff/etc/messages
+++ b/initramfs/stage3-stuff/etc/messages
@@ -34,9 +34,6 @@ with dhcp!"
init_errnwad=" Failed to load the network \
adaptor modules defined via mkdxsinitrd\n run. Please rerun and list the \
appropriate modules (without .ko)."
-init_nowlan=" No wireless LAN capable interface found. Did you provide the \
-proper kernel\n modules?"
-init_wlanf=" Unable to configure the WLAN interface."
init_bootmac=" If you have more than one ethernet adaptor present in your \
machine or using\n a NVidia chipset then it would be advisable to switch on \
passing of the\n boot MAC address via kernel commandline (IPAPPEND=3) in \
diff --git a/initramfs/stage3-stuff/etc/messages.de b/initramfs/stage3-stuff/etc/messages.de
index 20291fc9..9a44fe0e 100644
--- a/initramfs/stage3-stuff/etc/messages.de
+++ b/initramfs/stage3-stuff/etc/messages.de
@@ -33,9 +33,6 @@ Kombination mit IPAPPEND (PXE)\n o.ae. oder DHCP!"
init_errnwad=" Konnte die Netzwerk-Adapter, die durch den slx/mkramfs bzw. \
mkdxsinitrd-Aufruf definiert\n wurden, nicht laden. Bitte erneut aufrufen \
und die passenden Module auflisten\n (ohne Endung .ko)."
-init_nowlan=" Kein brauchbares WLAN-Interface gefunden. Wurden alle \
-notwendigen Kernel-\n module ins InirRamFS eingebaut?"
-init_wlanf=" Das WLAN Interface konnte nicht konfiguriert werden."
init_bootmac=" Es scheint mehr als eine Ethernet-Karte installiert und die \
passenden\n Kernel-Module geladen zu sein. Das kann fuer Probleme sorgen, da \
evtl.\n die nicht verbundene Netzwerkkarte als das erste Interface konfiguriert\
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/ .*//")