which must be executed. command -v is a shell builtin.
https://github.com/koalaman/shellcheck/wiki/SC2230
Signed-off-by: Rosen Penev <rosenp@gmail.com>
ret=$?
fi
- local shell="$(which bash)"
+ local shell="$(command -v bash)"
for i in $(grep -s "^/etc/init.d/" "$root/usr/lib/opkg/info/${pkgname}.list"); do
if [ -n "$root" ]; then
${shell:-/bin/sh} "$root/etc/rc.common" "$root$i" disable
rm -f /tmp/luci-indexcache
fi
- local shell="$(which bash)"
+ local shell="$(command -v bash)"
for i in $(grep -s "^/etc/init.d/" "$root$filelist"); do
if [ -n "$root" ]; then
${shell:-/bin/sh} "$root/etc/rc.common" "$root$i" enable