summaryrefslogtreecommitdiffstats
path: root/boot-env
diff options
context:
space:
mode:
authorMichael Janczyk2010-02-10 18:17:46 +0100
committerMichael Janczyk2010-02-10 18:17:46 +0100
commit00e4976c6bb69ceee23faae1ad6060bccb5b2630 (patch)
treeea0626f2d273c6f59c3ef57af68c7a0506bd7cae /boot-env
parentadding openslx log dir (diff)
parentsame improvement as rf00b265a but for pbs (diff)
downloadcore-00e4976c6bb69ceee23faae1ad6060bccb5b2630.tar.gz
core-00e4976c6bb69ceee23faae1ad6060bccb5b2630.tar.xz
core-00e4976c6bb69ceee23faae1ad6060bccb5b2630.zip
Merge branch 'master' of git@openslx.org:openslx/core
Diffstat (limited to 'boot-env')
-rwxr-xr-xboot-env/pbs/uclib-rootfs/init19
1 files changed, 19 insertions, 0 deletions
diff --git a/boot-env/pbs/uclib-rootfs/init b/boot-env/pbs/uclib-rootfs/init
index 7b558eac..0706dab8 100755
--- a/boot-env/pbs/uclib-rootfs/init
+++ b/boot-env/pbs/uclib-rootfs/init
@@ -156,6 +156,25 @@ fi
if [ -n "${SSID}" ] ; then
# WLAN setup will most probably change the network interface name stored in
# nwif (to wlan0 or something like that)
+ [ $DEBUGLEVEL -gt 0 ] && echo "set essid to ${essid}";
+ #value of essid unchecked yet
+ # load network adaptor modules
+ cd /lib/modules/$(ls /lib/modules/)/kernel/drivers/net/wireless
+ for mod in $(find . | grep .ko | sed 's,.*/\([^/]*\).ko,\1',); do
+ echo "Mod:";
+ echo $mod;
+ modprobe $mod || echo "module $mod did not load for some reason"
+ usleep 10000
+ done
+ cd /
+ wlanif=$(iwconfig 2>/dev/null|sed -n "/ESSID:/p"|sed "s/ .*//")
+ [ $DEBUGLEVEL -gt 0 ] && echo "wlancard recognized as ${wlanif}";
+ ip link set dev ${wlanif} up
+ if iwconfig ${wlanif} mode managed essid "${essid}"; then
+ nwif=${wlanif}
+ else
+ error " Unable to configure the WLAN interface."
+ fi
:
else
# check here for the active Ethernet link