diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-06-16 09:44:54 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-06-16 09:44:54 +0200 |
commit | 3069ceb7f91acb37fde64731b8ac7eaa505b0a0e (patch) | |
tree | 1e90df0fae9a6dae1e27ea161ff660e3c3f33a48 /package/base-files/src/etc | |
parent | a645cfcfe471a181704f1be6327850836169e1b9 (diff) |
add webcam and wireless-tools support for lemote
Diffstat (limited to 'package/base-files/src/etc')
-rwxr-xr-x | package/base-files/src/etc/network/if-pre-up.d/04-wireless | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/package/base-files/src/etc/network/if-pre-up.d/04-wireless b/package/base-files/src/etc/network/if-pre-up.d/04-wireless index 1898de4d4..1ccc4d823 100755 --- a/package/base-files/src/etc/network/if-pre-up.d/04-wireless +++ b/package/base-files/src/etc/network/if-pre-up.d/04-wireless @@ -74,13 +74,23 @@ case "$IF_WIRELESS_MODE" in } ;; sta) - [ -x /usr/sbin/iw ] || { - logger -t wireless "No iw utility found" - exit 1 - } ip link set up dev ${IFACE} - iw dev ${IFACE} set channel $IF_WIRELESS_CHANNEL - iw dev ${IFACE} connect $IF_WIRELESS_SSID + [ $IF_WIRELESS_EXTENSION -eq 1 ] && { + [ -x /usr/sbin/iwconfig ] || { + logger -t wireless "No wireless-tools found" + exit 1 + } + driver=wext + iwconfig ${IFACE} essid $IF_WIRELESS_SSID + } || { + [ -x /usr/sbin/iw ] || { + logger -t wireless "No iw utility found" + exit 1 + } + driver=nl80211 + iw dev ${IFACE} set channel $IF_WIRELESS_CHANNEL + iw dev ${IFACE} connect $IF_WIRELESS_SSID + } [ $wpa2 -eq 1 ] && { [ -x /usr/sbin/wpa_supplicant ] || { logger -t wireless "No wpa_supplicant found" @@ -93,7 +103,7 @@ case "$IF_WIRELESS_MODE" in echo " psk=\"$IF_WIRELESS_PASSPHRASE\"" >> /tmp/wpa_supplicant.conf echo " priority=5" >> /tmp/wpa_supplicant.conf echo "}" >> /tmp/wpa_supplicant.conf - wpa_supplicant -B -Dnl80211 -i${IFACE} -c/tmp/wpa_supplicant.conf + wpa_supplicant -B -D${driver} -i${IFACE} -c/tmp/wpa_supplicant.conf } ;; *) |