From 6becc37f33be4c2f2b5d58467bdda41c251d9e2e Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 30 Oct 2019 16:59:14 +0100 Subject: [PATCH] base-files: add 'wifi reconf' Now that netifd and hostapd allow dynamic reconfiguration, add a command to trigger it. Signed-off-by: John Crispin Signed-off-by: Daniel Golle --- package/base-files/Makefile | 2 +- package/base-files/files/sbin/wifi | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index addbac866447..5c121ace24da 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=206 +PKG_RELEASE:=207 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi index f7a10de215c9..261d2fb500b9 100755 --- a/package/base-files/files/sbin/wifi +++ b/package/base-files/files/sbin/wifi @@ -130,6 +130,10 @@ wifi_updown() { scan_wifi cmd=up } + [ reconf = "$1" ] && { + scan_wifi + cmd=reconf + } ubus_wifi_cmd "$cmd" "$2" _wifi_updown "$@" } @@ -241,6 +245,7 @@ case "$1" in reload) wifi_reload "$2";; reload_legacy) wifi_reload_legacy "$2";; --help|help) usage;; + reconf) ubus call network reload; wifi_updown "reconf" "$2";; ''|up) ubus call network reload; wifi_updown "enable" "$2";; *) usage; exit 1;; esac -- 2.30.2