summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/src/etc/network/if-pre-up.d/04-wireless6
1 files changed, 5 insertions, 1 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 f1905c33c..030502efc 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
@@ -90,7 +90,11 @@ case "$IF_WIRELESS_MODE" in
exit 1
}
driver=nl80211
- iw dev ${IFACE} connect $IF_WIRELESS_SSID
+ [ $sec -eq 2 ] && {
+ iw dev ${IFACE} connect $IF_WIRELESS_SSID key d:0:$IF_WIRELESS_PASSPHRASE
+ } || {
+ iw dev ${IFACE} connect $IF_WIRELESS_SSID
+ }
}
[ $wpa2 -eq 1 ] && {
[ -x /usr/sbin/wpa_supplicant ] || {