mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user