diff options
Diffstat (limited to 'package/base-files/src/etc')
-rwxr-xr-x | package/base-files/src/etc/network/if-pre-up.d/04-wireless | 7 |
1 files changed, 5 insertions, 2 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 ebcec5a12..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,8 +90,11 @@ case "$IF_WIRELESS_MODE" in exit 1 } driver=nl80211 - iw dev ${IFACE} set channel $IF_WIRELESS_CHANNEL - 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 ] || { |