hostapd: always install the cli

Fixes: WIFI-6834
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2022-02-15 11:44:49 +01:00
parent 4dcd0ad1da
commit dd995426a5
3 changed files with 59 additions and 2 deletions

View File

@@ -112,19 +112,25 @@ addiface() {
local ssid
[ -d /sys/class/net/$ifb/ ] && {
[ -f /tmp/ratelimit.$iface -o -d /sys/class/net/$ifb/ ] && {
return 0
}
echo -n startup > /tmp/ratelimit.$iface
sleep 2
ssid=$(ubus call network.wireless status | jsonfilter -e '@[*].interfaces[@.ifname="'"$iface"'"].config.ssid')
[ -z "$ssid" ] && {
rm /tmp/ratelimit.$iface
logger "ratelimit: failed to lookup ssid"
exit 1
}
config_load ratelimit
config_foreach find_ssid rate $ssid
[ "$found" -eq 0 ] && exit 0
[ "$found" -eq 0 ] && {
rm /tmp/ratelimit.$iface
exit 0
}
logger "ratelimit: adding new iface settings"
echo -n $ssid > /tmp/ratelimit.$iface

View File

@@ -627,6 +627,7 @@ define Package/wpad/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wpad $(1)/usr/sbin/
$(LN) wpad $(1)/usr/sbin/hostapd
$(LN) wpad $(1)/usr/sbin/wpa_supplicant
$(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/
endef
Package/wpad-basic/install = $(Package/wpad/install)
Package/wpad-basic-openssl/install = $(Package/wpad/install)

View File

@@ -0,0 +1,50 @@
From 19fc552fd925a4f6f75bbf6c7c7a2f6f98af73d8 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 15 Feb 2022 11:44:05 +0100
Subject: [PATCH] hostapd: always install the cli
Signed-off-by: John Crispin <john@phrozen.org>
---
package/network/services/hostapd/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 584695786f..243c43551e 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -428,7 +428,7 @@ define Package/hostapd-utils
SUBMENU:=WirelessAPD
TITLE:=IEEE 802.1x Authenticator (utils)
URL:=http://hostap.epitest.fi/
- DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
+# DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
VARIANT:=*
endef
@@ -620,12 +620,11 @@ Package/hostapd-mini/install = $(Package/hostapd/install)
Package/hostapd-openssl/install = $(Package/hostapd/install)
Package/hostapd-wolfssl/install = $(Package/hostapd/install)
-ifneq ($(LOCAL_TYPE),supplicant)
- define Package/hostapd-utils/install
+define Package/hostapd-utils/install
+ abc
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/
- endef
-endif
+endef
define Package/wpad/install
$(call Install/hostapd,$(1))
@@ -633,6 +632,7 @@ define Package/wpad/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wpad $(1)/usr/sbin/
$(LN) wpad $(1)/usr/sbin/hostapd
$(LN) wpad $(1)/usr/sbin/wpa_supplicant
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/
endef
Package/wpad-basic/install = $(Package/wpad/install)
Package/wpad-basic-openssl/install = $(Package/wpad/install)
--
2.25.1