diff options
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/Makefile | 15 | ||||
-rwxr-xr-x | package/base-files/src/etc/network/if-post-down.d/03-wireless | 5 | ||||
-rwxr-xr-x | package/base-files/src/etc/network/if-pre-up.d/04-wireless | 2 |
3 files changed, 14 insertions, 8 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 0b0f95950..7b0ececcd 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:= 65 +PKG_RELEASE:= 66 PKG_SECTION:= base PKG_DESCR:= basic files and scripts PKG_BUILDDEP:= pkgconf-host file-host @@ -111,11 +111,11 @@ ifneq (${ADK_SIMPLE_NETWORK_CONFIG},) echo -e "auto lo\niface lo inet loopback" > ${IDIR_BASE_FILES}/etc/network/interfaces # network config eth0 - # configure nic with manual ip + # configure nic with dhcp ifeq (${SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC},y) echo -e "\nauto eth0\niface eth0 inet dhcp" >> ${IDIR_BASE_FILES}/etc/network/interfaces endif - # configure nic with dhcp + # configure nic with manual ip ifeq (${SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC_MANUAL},y) echo -e "\nauto eth0\niface eth0 inet static" >> ${IDIR_BASE_FILES}/etc/network/interfaces echo -e " address ${SIMPLE_NETWORK_CONFIG_ETH0_IP}" >> ${IDIR_BASE_FILES}/etc/network/interfaces @@ -137,12 +137,17 @@ ifeq (${SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE_IP},y) echo -e " bridge-ports ${SIMPLE_NETWORK_CONFIG_ETH0_BRIDGE}" >> ${IDIR_BASE_FILES}/etc/network/interfaces endif + # network config wlan0 +ifeq (${SIMPLE_NETWORK_CONFIG_WLAN0_TYPE_NIC},y) + echo -e "\nauto wlan0\niface wlan0 inet dhcp" >> ${IDIR_BASE_FILES}/etc/network/interfaces +endif + # network config eth1 - # configure nic with manual ip + # configure nic with dhcp ifeq (${SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC},y) echo -e "\nauto eth1\niface eth1 inet dhcp" >> ${IDIR_BASE_FILES}/etc/network/interfaces endif - # configure nic with dhcp + # configure nic with manual ip ifeq (${SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC_MANUAL},y) echo -e "\nauto eth1\niface eth1 inet static" >> ${IDIR_BASE_FILES}/etc/network/interfaces echo -e " address ${SIMPLE_NETWORK_CONFIG_ETH1_IP}" >> ${IDIR_BASE_FILES}/etc/network/interfaces diff --git a/package/base-files/src/etc/network/if-post-down.d/03-wireless b/package/base-files/src/etc/network/if-post-down.d/03-wireless index 86e0c73e1..67c01714e 100755 --- a/package/base-files/src/etc/network/if-post-down.d/03-wireless +++ b/package/base-files/src/etc/network/if-post-down.d/03-wireless @@ -1,4 +1,5 @@ -#!/bin/sh +#!/bin/sh +set -x set -e [ "${IFACE%%[0-9]*}" = "wlan" ] || exit 0 @@ -11,7 +12,7 @@ case "$IF_WIRELESS_MODE" in sta) [ "$IF_WIRELESS_SECURITY" != "none" ] && { logger -t wireless "Killing wpa_supplicant" - pkill wpa_supplicant + kill -9 $(cat /var/run/wpa_supplicant.pid) } ;; *) 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 f69f273d0..98ac932df 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 @@ -107,7 +107,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 -D${driver} -i${IFACE} -c/tmp/wpa_supplicant.conf + wpa_supplicant -B -D${driver} -i${IFACE} -P/var/run/wpa_supplicant.pid -c/tmp/wpa_supplicant.conf } ;; *) |