diff options
-rw-r--r-- | package/base-files/Makefile | 2 | ||||
-rwxr-xr-x | package/base-files/src/etc/network/if-pre-up.d/04-wireless | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 7a3fedf59..7531561de 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 52 +PKG_RELEASE:= 53 PKG_SECTION:= base PKG_DESCR:= basic files and scripts 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 ] || { |