diff mbox series

[3/3] hostapd: restore /etc/hostapd directory on sysupgrade

Message ID 20240304214243.3677-4-ansuelsmth@gmail.com
State Handled Elsewhere
Delegated to: Ansuel Smith
Headers show
Series wifi-scripts: fix WPS usage | expand

Commit Message

Christian Marangi March 4, 2024, 9:42 p.m. UTC
Restore /etc/hostapd directory on sysupgrade since it does contain
per-device PSK handled by hostapd for WPS usage.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 package/network/services/hostapd/Makefile | 40 ++++++++++++++++-------
 1 file changed, 28 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index c8f476f7b8..a1cd2416fb 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -5,7 +5,7 @@ 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
@@ -679,23 +679,39 @@  define Install/hostapd/full
 	$(INSTALL_DATA) ./files/radius.users $(1)/etc/radius/users
 endef
 
+define Package/hostapd/conffiles
+/etc/hostapd
+endef
+
+Package/wpad-mesh-openssl/conffiles = $(Package/hostapd/conffiles)
+Package/wpad-mesh-wolfssl/conffiles = $(Package/hostapd/conffiles)
+Package/wpad-mesh-mbedtls/conffiles = $(Package/hostapd/conffiles)
+Package/wpad/conffiles = $(Package/hostapd/conffiles)
+Package/wpad-openssl/conffiles = $(Package/hostapd/conffiles)
+Package/wpad-wolfssl/conffiles = $(Package/hostapd/conffiles)
+Package/wpad-mbedtls/conffiles = $(Package/hostapd/conffiles)
+Package/hostapd-openssl/conffiles = $(Package/hostapd/conffiles)
+Package/hostapd-wolfssl/conffiles = $(Package/hostapd/conffiles)
+Package/hostapd-mbedtls/conffiles = $(Package/hostapd/conffiles)
+
 define Package/hostapd-full/conffiles
+$(Package/hostapd/conffiles)
 /etc/config/radius
 /etc/radius
 endef
 
 ifeq ($(CONFIG_VARIANT),full)
-Package/wpad-mesh-openssl/conffiles = $(Package/hostapd-full/conffiles)
-Package/wpad-mesh-wolfssl/conffiles = $(Package/hostapd-full/conffiles)
-Package/wpad-mesh-mbedtls/conffiles = $(Package/hostapd-full/conffiles)
-Package/wpad/conffiles = $(Package/hostapd-full/conffiles)
-Package/wpad-openssl/conffiles = $(Package/hostapd-full/conffiles)
-Package/wpad-wolfssl/conffiles = $(Package/hostapd-full/conffiles)
-Package/wpad-mbedtls/conffiles = $(Package/hostapd-full/conffiles)
-Package/hostapd/conffiles = $(Package/hostapd-full/conffiles)
-Package/hostapd-openssl/conffiles = $(Package/hostapd-full/conffiles)
-Package/hostapd-wolfssl/conffiles = $(Package/hostapd-full/conffiles)
-Package/hostapd-mbedtls/conffiles = $(Package/hostapd-full/conffiles)
+Package/wpad-mesh-openssl/conffiles += $(Package/hostapd-full/conffiles)
+Package/wpad-mesh-wolfssl/conffiles += $(Package/hostapd-full/conffiles)
+Package/wpad-mesh-mbedtls/conffiles += $(Package/hostapd-full/conffiles)
+Package/wpad/conffiles += $(Package/hostapd-full/conffiles)
+Package/wpad-openssl/conffiles += $(Package/hostapd-full/conffiles)
+Package/wpad-wolfssl/conffiles += $(Package/hostapd-full/conffiles)
+Package/wpad-mbedtls/conffiles += $(Package/hostapd-full/conffiles)
+Package/hostapd/conffiles += $(Package/hostapd-full/conffiles)
+Package/hostapd-openssl/conffiles += $(Package/hostapd-full/conffiles)
+Package/hostapd-wolfssl/conffiles += $(Package/hostapd-full/conffiles)
+Package/hostapd-mbedtls/conffiles += $(Package/hostapd-full/conffiles)
 endif
 
 define Install/hostapd