diff options
author | Dirk von Suchodoletz | 2009-02-18 18:10:59 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2009-02-18 18:10:59 +0100 |
commit | cb66e76c02d3a39778b2dfa96b90189cb9f0fd6b (patch) | |
tree | 842b6a7b70e650a8a419734b2f1bd540a77eac5d /os-plugins/plugins/wlanboot | |
parent | xserver: * corrected kernel module building with nvidia-installer (diff) | |
download | core-cb66e76c02d3a39778b2dfa96b90189cb9f0fd6b.tar.gz core-cb66e76c02d3a39778b2dfa96b90189cb9f0fd6b.tar.xz core-cb66e76c02d3a39778b2dfa96b90189cb9f0fd6b.zip |
Small fix for wlanboot plugin inithook script.
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2601 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/wlanboot')
-rwxr-xr-x | os-plugins/plugins/wlanboot/init-hooks/10-nw-if-config/wlanboot.sh | 47 |
1 files changed, 27 insertions, 20 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 index 169e567d..40d8e102 100755 --- 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 @@ -10,27 +10,34 @@ # # stage3 init-hook 10 of 'wlanboot' plugin - firing up the wlan connection -if [ $wlanboot_active -ne 0 ]; then - # get essid for WLAN boot - for source in /proc/cmdline /etc/initramfs-setup ; do - essid=$(grep essid $source) - if [ -n "$essid" ] ; then - essid=${essid#essid=} - break - fi - done - # do WLAN specific settings, definition of wlan interface name and wireless - # connect - 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} +if [ -e /initramfs/plugin-conf/wlanboot.conf ] ; then + . /initramfs/plugin-conf/wlanboot.conf + + if [ $wlanboot_active -ne 0 ]; then + # get essid for WLAN boot + for source in /proc/cmdline /etc/initramfs-setup ; do + essid=$(grep essid $source) + if [ -n "$essid" ] ; then + essid=${essid#essid=} + break + fi + done + # do WLAN specific settings, definition of wlan interface name and wireless + # connect + 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 " Unable to configure the WLAN interface." + fi else - error " Unable to configure the WLAN interface." - fi - else - error " No wireless LAN capable interface found. Did you provide the \ + error " No wireless LAN capable interface found. Did you provide the \ proper kernel\n modules and firmware?" + fi + fi +else + error " No configuration file found for wlanboot plugin." fi |