From 1fdf6b745cc3d85be3743837817a360121554134 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sun, 9 Aug 2020 15:33:37 -1000 Subject: treewide: replace `which` with `command -v` Fix shellcheck SC2230 > which is non-standard. Use builtin 'command -v' instead. Using `command -v` is POSIX compliant while `which` is not. Also to mention, `command -v` is a shell builtin whereas `which` is a separate busybox applet. Once applied to everything concerning OpenWrt we can disable the busybox feature `which` and save 3.8kB. Acked-by: Stijn Tintel Signed-off-by: Paul Spooren [also replace cases in zram-swap] Signed-off-by: Adrian Schmutzler --- package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package/kernel/broadcom-wl') diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh index 33447341b2..352c365f27 100644 --- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh @@ -223,7 +223,7 @@ enable_broadcom() { } local _c=0 - local nas="$(which nas)" + local nas="$(command -v nas)" local if_pre_up if_up nas_cmd local vif vif_pre_up vif_post_up vif_do_up vif_txpower local bssmax=$(wlc ifname "$device" bssmax) -- cgit v1.2.3