aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-02-07 21:42:19 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-02-07 21:58:51 +0100
commit1c0e13db43b41a1d527428b82bf88a032a916e84 (patch)
tree5438303f8321122da55f1a8783c0d179f702c9fe /target/linux/ramips
parent88fbddb49d7128ee565c65bcc1e72ae68c7c2635 (diff)
downloadupstream-1c0e13db43b41a1d527428b82bf88a032a916e84.tar.gz
upstream-1c0e13db43b41a1d527428b82bf88a032a916e84.tar.bz2
upstream-1c0e13db43b41a1d527428b82bf88a032a916e84.zip
ramips: mt7621: use preferred logic in lib/upgrade/iodata.sh
shellcheck recommends || and && over "-a" and "-o" because the latter are not well defined. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/mt7621/base-files/lib/upgrade/iodata.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/iodata.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/iodata.sh
index 071a132e02..8303ae9922 100644
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/iodata.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/iodata.sh
@@ -29,7 +29,7 @@ iodata_mstc_upgrade_prepare() {
iodata_mstc_prepare_fail
fi
- if [ -z "$persist_mtd" -o -z "$factory_mtd" ]; then
+ if [ -z "$persist_mtd" ] || [ -z "$factory_mtd" ]; then
echo 'cannot find mtd partition(s), "factory" or "persist"'
iodata_mstc_prepare_fail
fi
@@ -37,11 +37,11 @@ iodata_mstc_upgrade_prepare() {
local bootnum=$(hexdump -s 4 -n 1 -e '"%x"' ${persist_mtd})
local debugflag=$(hexdump -s $((dflag_offset)) -n 1 -e '"%x"' ${factory_mtd})
- if [ "$bootnum" != "1" -a "$bootnum" != "2" ]; then
+ if [ "$bootnum" != "1" ] && [ "$bootnum" != "2" ]; then
echo "failed to get bootnum, please check the value at 0x4 in ${persist_mtd}"
iodata_mstc_prepare_fail
fi
- if [ "$debugflag" != "0" -a "$debugflag" != "1" ]; then
+ if [ "$debugflag" != "0" ] && [ "$debugflag" != "1" ]; then
echo "failed to get debugflag, please check the value at ${dflag_offset} in ${factory_mtd}"
iodata_mstc_prepare_fail
fi