From: Andre Heider Date: Wed, 2 Nov 2022 07:49:35 +0000 (+0100) Subject: base-files: use named variables in the wifi script X-Git-Tag: v23.05.0-rc1~508 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8fbe7738b9ef4131c8ca069c0f3abde134139da2;p=openwrt%2Fstaging%2Fpepe2k.git 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 --- 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() {(