diff mbox series

[OpenWrt-Devel] Fwd: [PATCH] hostapd: wpad init script renamed

Message ID b1c2298d-8d2f-e8e1-b72c-6990f10c9fe1@turf.org
State Superseded
Headers show
Series [OpenWrt-Devel] Fwd: [PATCH] hostapd: wpad init script renamed | expand

Commit Message

Michael T Farnworth June 8, 2020, 3:52 p.m. UTC
When hostapd is launched as /etc/init.d/wpad it appears in a different
location under "ubus call service list" presenting problems with scripts
/lib/netifd/hostapd.sh and /lib/netifd/wireless/mac80211.sh.  Either
these scripts need to be patched to recognise the move, or the
init.d script needs to be renamed to hostapd.  This patch renames the
init.d script as unidentified things may also depend upon the placement
of entries within ubus output.  This ubus change only came about on the
8 April 2020 and it is unlikely that very much code has been written or
re-written to support the renaming.  Problem is manifested in log files
as "/usr/sbin/wpad does not match process  path (/proc/exe)"

Signed-off-by: Michael T Farnworth <michael@turf.org>
diff mbox series

Patch

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index 66560d5d41..b8b7c2b315 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -533,7 +533,7 @@  endef
  define Package/hostapd-common/install
         $(INSTALL_DIR) $(1)/lib/netifd $(1)/etc/rc.button 
$(1)/etc/hotplug.d/ieee80211 $(1)/etc/init.d
         $(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/netifd/hostapd.sh
-       $(INSTALL_BIN) ./files/wpad.init $(1)/etc/init.d/wpad
+       $(INSTALL_BIN) ./files/hostapd.init $(1)/etc/init.d/hostapd
         $(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps
  endef

diff --git a/package/network/services/hostapd/files/wpad.init 
b/package/network/services/hostapd/files/hostapd.init
similarity index 97%
rename from package/network/services/hostapd/files/wpad.init
rename to package/network/services/hostapd/files/hostapd.init
index 3198e9801f..b9494b6bf5 100644
--- a/package/network/services/hostapd/files/wpad.init
+++ b/package/network/services/hostapd/files/hostapd.init
@@ -4,7 +4,7 @@  START=19
  STOP=21

  USE_PROCD=1
-NAME=wpad
+NAME=hostapd

  start_service() {
         if [ -x "/usr/sbin/hostapd" ]; then