Browse Source

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 <[email protected]>
Andre Heider 3 years ago
parent
commit
8fbe7738b9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      package/base-files/files/sbin/wifi

+ 2 - 2
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() {(