summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-mwan3
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2020-08-09 13:42:09 -1000
committerPaul Spooren <mail@aparcar.org>2020-08-20 15:54:54 -1000
commitc4a4e43e2e97065dcda53c9ac7ee49c05171dbd8 (patch)
tree5f2e877793a63c9e639410ce868d2f755f5db695 /applications/luci-app-mwan3
parent03253c23090a9928c15ab8d80c18b734e3e814ed (diff)
treewide: replace `which` with `command -v`
Fix shellcheck SC2230 > which is non-standard. Use builtin 'command -v' instead. Once applied to everything concerning OpenWrt we can disable the busybox feature `which` and save 3.8kB. Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'applications/luci-app-mwan3')
-rw-r--r--applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
index bcbf03d54e..e52791a1cf 100644
--- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
+++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
@@ -41,18 +41,18 @@ track_ip.datatype = "host"
track_method = mwan_interface:option(ListValue, "track_method", translate("Tracking method"))
track_method.default = "ping"
track_method:value("ping")
-if os.execute("which nping 1>/dev/null") == 0 then
+if os.execute("command -v nping 1>/dev/null") == 0 then
track_method:value("nping-tcp")
track_method:value("nping-udp")
track_method:value("nping-icmp")
track_method:value("nping-arp")
end
-if os.execute("which arping 1>/dev/null") == 0 then
+if os.execute("command -v arping 1>/dev/null") == 0 then
track_method:value("arping")
end
-if os.execute("which httping 1>/dev/null") == 0 then
+if os.execute("command -v httping 1>/dev/null") == 0 then
track_method:value("httping")
end