diff options
author | Paul Spooren <mail@aparcar.org> | 2020-08-09 13:19:25 -1000 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2020-08-09 13:58:14 -1000 |
commit | 30ea917518b4d0643e0e2aa21daa26f78290bbbf (patch) | |
tree | 0c4f76ae8a01124761466a6263aca584344190f5 /net/trafficshaper/files | |
parent | 416dccf72a82b624c9f42f2f4a6553439721a49f (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 'net/trafficshaper/files')
-rwxr-xr-x | net/trafficshaper/files/trafficshaper.init | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/trafficshaper/files/trafficshaper.init b/net/trafficshaper/files/trafficshaper.init index 445f50e38..00bfebc28 100755 --- a/net/trafficshaper/files/trafficshaper.init +++ b/net/trafficshaper/files/trafficshaper.init @@ -64,11 +64,11 @@ requires() { die 2 "cannot load $module. Please install kmod-$module" done for cmd in $REQ_CMDS; do - which $cmd &>/dev/null || + command -v $cmd &>/dev/null || die 2 "cannot find command $cmd. Please install $cmd" done - if ! which ip6tables &>/dev/null; then + if ! command -v ip6tables &>/dev/null; then v "Disabling IPv6 as ip6tables was not found" IP6T=true fi |