aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-01-16 20:43:57 -0800
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-01-17 12:17:36 +0100
commitfb56573dc4a5dda48953916b533a26af68b16f11 (patch)
tree51c836d90d489f7f640634a5b6736bb60d143870 /package/base-files
parentb8e17aefea91632a70634aa2828a8b548c2b2567 (diff)
downloadupstream-fb56573dc4a5dda48953916b533a26af68b16f11.tar.gz
upstream-fb56573dc4a5dda48953916b533a26af68b16f11.tar.bz2
upstream-fb56573dc4a5dda48953916b533a26af68b16f11.zip
base-files/functions.sh: use && instead of -a
-a is not well defined. https://github.com/koalaman/shellcheck/wiki/SC2166 Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/lib/functions.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 40a7527aa5..8e189e4f4d 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -143,7 +143,7 @@ config_foreach() {
[ -z "$CONFIG_SECTIONS" ] && return 0
for section in ${CONFIG_SECTIONS}; do
config_get cfgtype "$section" TYPE
- [ -n "$___type" -a "x$cfgtype" != "x$___type" ] && continue
+ [ -n "$___type" ] && [ "x$cfgtype" != "x$___type" ] && continue
eval "$___function \"\$section\" \"\$@\""
done
}
@@ -374,4 +374,4 @@ board_name() {
[ -e /tmp/sysinfo/board_name ] && cat /tmp/sysinfo/board_name || echo "generic"
}
-[ -z "$IPKG_INSTROOT" -a -f /lib/config/uci.sh ] && . /lib/config/uci.sh
+[ -z "$IPKG_INSTROOT" ] && [ -f /lib/config/uci.sh ] && . /lib/config/uci.sh