[hostapd] use new button scheme
authorJohn Crispin <john@openwrt.org>
Wed, 13 Mar 2013 18:11:25 +0000 (18:11 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 13 Mar 2013 18:11:25 +0000 (18:11 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 36004

package/network/services/hostapd/Makefile
package/network/services/hostapd/files/wps-hotplug.sh

index 80845bf06b5ab3ba3439993e62849306573f69e5..16db2d8e23f0d67317af63bcde5acbf29af0adc9 100644 (file)
@@ -303,6 +303,11 @@ ifneq ($(LOCAL_TYPE),supplicant)
        $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/hotplug.d/button
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/
        $(INSTALL_DATA) ./files/wps-hotplug.sh $(1)/etc/hotplug.d/button/50-wps
+       $(if $(CONFIG_PROCD_INIT),
+               $(INSTALL_DIR) $(1)/etc/rc.button/
+               $(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps,
+               $(INSTALL_DATA) ./files/wps-hotplug.sh $(1)/etc/hotplug.d/button/50-wps
+       )
   endef
 endif
 
index b5376cc55b37cb48798dc3f8b0411ff7914eb72b..ffd3cf929bb4a1bdf9f4de95bc4f11e3f1e59d26 100644 (file)
@@ -1,3 +1,5 @@
+#!/bin/sh
+
 if [ "$ACTION" = "pressed" -a "$BUTTON" = "wps" ]; then
        for dir in /var/run/hostapd-*; do
                [ -d "$dir" ] || continue