aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin/wifi
diff options
context:
space:
mode:
authorAndre Heider <a.heider@gmail.com>2022-11-02 08:49:35 +0100
committerChristian Marangi <ansuelsmth@gmail.com>2023-04-12 19:49:22 +0200
commit8fbe7738b9ef4131c8ca069c0f3abde134139da2 (patch)
treee8eae542def45bbce611e3e8f922e974aacb9893 /package/base-files/files/sbin/wifi
parent930e702d72b0fc593441c92519cc6515e4f784cc (diff)
downloadupstream-8fbe7738b9ef4131c8ca069c0f3abde134139da2.tar.gz
upstream-8fbe7738b9ef4131c8ca069c0f3abde134139da2.tar.bz2
upstream-8fbe7738b9ef4131c8ca069c0f3abde134139da2.zip
base-files: use named variables in the wifi script
Use the already present but unused $cmd and $dev variables instead of positional parameters in ubus_wifi_cmd() to improve readability. Signed-off-by: Andre Heider <a.heider@gmail.com>
Diffstat (limited to 'package/base-files/files/sbin/wifi')
-rwxr-xr-xpackage/base-files/files/sbin/wifi4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index 6a9dce7e8a..29585389df 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -17,8 +17,8 @@ ubus_wifi_cmd() {
local dev="$2"
json_init
- [ -n "$2" ] && json_add_string device "$2"
- ubus call network.wireless "$1" "$(json_dump)"
+ [ -n "$dev" ] && json_add_string device "$dev"
+ ubus call network.wireless "$cmd" "$(json_dump)"
}
find_net_config() {(