mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-01 02:48:18 +00:00
hostapd: always install the cli
Fixes: WIFI-6834 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -112,19 +112,25 @@ addiface() {
|
|||||||
local ssid
|
local ssid
|
||||||
|
|
||||||
|
|
||||||
[ -d /sys/class/net/$ifb/ ] && {
|
[ -f /tmp/ratelimit.$iface -o -d /sys/class/net/$ifb/ ] && {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo -n startup > /tmp/ratelimit.$iface
|
||||||
|
|
||||||
sleep 2
|
sleep 2
|
||||||
ssid=$(ubus call network.wireless status | jsonfilter -e '@[*].interfaces[@.ifname="'"$iface"'"].config.ssid')
|
ssid=$(ubus call network.wireless status | jsonfilter -e '@[*].interfaces[@.ifname="'"$iface"'"].config.ssid')
|
||||||
[ -z "$ssid" ] && {
|
[ -z "$ssid" ] && {
|
||||||
|
rm /tmp/ratelimit.$iface
|
||||||
logger "ratelimit: failed to lookup ssid"
|
logger "ratelimit: failed to lookup ssid"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
config_load ratelimit
|
config_load ratelimit
|
||||||
config_foreach find_ssid rate $ssid
|
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"
|
logger "ratelimit: adding new iface settings"
|
||||||
|
|
||||||
echo -n $ssid > /tmp/ratelimit.$iface
|
echo -n $ssid > /tmp/ratelimit.$iface
|
||||||
|
|||||||
@@ -627,6 +627,7 @@ define Package/wpad/install
|
|||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wpad $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wpad $(1)/usr/sbin/
|
||||||
$(LN) wpad $(1)/usr/sbin/hostapd
|
$(LN) wpad $(1)/usr/sbin/hostapd
|
||||||
$(LN) wpad $(1)/usr/sbin/wpa_supplicant
|
$(LN) wpad $(1)/usr/sbin/wpa_supplicant
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/hostapd/hostapd_cli $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
Package/wpad-basic/install = $(Package/wpad/install)
|
Package/wpad-basic/install = $(Package/wpad/install)
|
||||||
Package/wpad-basic-openssl/install = $(Package/wpad/install)
|
Package/wpad-basic-openssl/install = $(Package/wpad/install)
|
||||||
|
|||||||
50
patches/wifi/0009-hostapd-always-install-the-cli.patch
Normal file
50
patches/wifi/0009-hostapd-always-install-the-cli.patch
Normal 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
|
||||||
|
|
||||||
Reference in New Issue
Block a user