diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-11-11 05:15:55 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-11-11 05:15:55 +0000 |
commit | 52b1e9bd2bfdb74a98442e6b5388187b57e795e8 (patch) | |
tree | 60efb6c5f1f10362cc65b72fff1cefacde3b957f /package/hostapd | |
parent | 46b2f0a154046755bf15ebf01f912db5da10fe8a (diff) | |
download | master-187ad058-52b1e9bd2bfdb74a98442e6b5388187b57e795e8.tar.gz master-187ad058-52b1e9bd2bfdb74a98442e6b5388187b57e795e8.tar.bz2 master-187ad058-52b1e9bd2bfdb74a98442e6b5388187b57e795e8.zip |
hostapd: automatically add wds sta interfaces of an ap to the right bridge
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18365 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/hostapd')
-rw-r--r-- | package/hostapd/Makefile | 2 | ||||
-rw-r--r-- | package/hostapd/files/hostapd.hotplug | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index 606ec67360..a39b0e243c 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -109,6 +109,8 @@ define Build/Compile endef define Package/InstallTemplate + $(INSTALL_DIR) $(1)/etc/hotplug.d/net + $(INSTALL_DATA) ./files/hostapd.hotplug $(1)/etc/hotplug.d/net/ $(INSTALL_DIR) $(1)/lib/wifi $(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/wifi/hostapd.sh $(INSTALL_DIR) $(1)/usr/sbin diff --git a/package/hostapd/files/hostapd.hotplug b/package/hostapd/files/hostapd.hotplug new file mode 100644 index 0000000000..2964224284 --- /dev/null +++ b/package/hostapd/files/hostapd.hotplug @@ -0,0 +1,12 @@ +if [ "$ACTION" = "add" -o "$ACTION" = "register" ]; then + case "$INTERFACE" in + wlan*.sta*) + local BASEIF="${INTERFACE%%\.*}" + + include /lib/network + scan_interfaces + local CONFIG="$(find_config "$BASEIF")" + [ -n "$CONFIG" ] && setup_interface "$INTERFACE" "$CONFIG" + ;; + esac +fi |