diff options
author | Sebastian Schmelzer | 2010-09-02 17:50:49 +0200 |
---|---|---|
committer | Sebastian Schmelzer | 2010-09-02 17:50:49 +0200 |
commit | 416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5 (patch) | |
tree | 4715f7d742fec50931017f38fe6ff0a89d4ceccc /os-plugins/plugins/wlanboot/init-hooks/10-nw-if-config/wlanboot.sh | |
parent | Fix for the problem reported on the list (sed filter forgotten for the (diff) | |
download | core-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.tar.gz core-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.tar.xz core-416ab8a37f1b07dc9f6c0fb3ff1a8ff2036510b5.zip |
change dir structure
Diffstat (limited to 'os-plugins/plugins/wlanboot/init-hooks/10-nw-if-config/wlanboot.sh')
-rwxr-xr-x | os-plugins/plugins/wlanboot/init-hooks/10-nw-if-config/wlanboot.sh | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/os-plugins/plugins/wlanboot/init-hooks/10-nw-if-config/wlanboot.sh b/os-plugins/plugins/wlanboot/init-hooks/10-nw-if-config/wlanboot.sh deleted file mode 100755 index fee893d4..00000000 --- a/os-plugins/plugins/wlanboot/init-hooks/10-nw-if-config/wlanboot.sh +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (c) 2009 - OpenSLX GmbH -# -# This program/file is free software distributed under the GPL version 2. -# See http://openslx.org/COPYING -# -# If you have any feedback please consult http://openslx.org/feedback and -# send your feedback to feedback@openslx.org -# -# General information about OpenSLX can be found at http://openslx.org -# -# stage3 init-hook 10 of 'wlanboot' plugin - firing up the wlan connection - -#setting udhcpc up -mkdir -p /usr/share/udhcpc -echo -e "#!/bin/ash\nunset infomsg HOME IFS mask lease interface DEBUGLEVEL \ -BOOT_IMAGE\nset >/tmp/ipstuff" >/usr/share/udhcpc/default.script -chmod u+x /usr/share/udhcpc/default.script - -echo "! shutting down watchdog for debugging"; -killall watchdog; - -essid=$(sed -n 's/.*essid=\([^[:blank:]]*\) .*/\1/p' /proc/cmdline); -[ $DEBUGLEVEL -gt 0 ] && echo "set essid to ${essid}"; -#value of essid unchecked yet - - -# load network adaptor modules -#modprobe iwl3945 -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}"; - -if [ -n "$wlanif" ] ; then - 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 - - - ( sleep 6 ; killall udhcpc >/dev/null 2>&1 ) & - udhcpc -f -n -q $vci -s /usr/share/udhcpc/default.script -i $nwif 2>/dev/null - if grep "ip=" /tmp/ipstuff >/dev/null 2>&1 ; then - . /tmp/ipstuff - for i in $dns ; do - echo "nameserver $i" >>/etc/resolv.conf - done - # simply add a single dns server for passing via kernel cmdline to stage3 - # (quickhack, just the last, list of dns might be better ...) - echo "dnssrv=$i" >>/tmp/ipstuff - return - else - if [ $i -eq 1 ] ; then - sleep 1 - else - echo "Did not get any proper IP configuration"; /bin/ash - fi - fi - - ip addr add $ip/$(ipcalc -s -p $ip $subnet|sed s/.*=//) dev $nwif - ip route add default via $router - [ $DEBUGLEVEL -gt 0 ] && echo "IP-Configuration: $ip on interface $wlanif." -else - error " No wireless LAN capable interface found. Did you provide the \ -proper kernel\n modules and firmware?" -fi
\ No newline at end of file |