aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/orion
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2019-07-14 22:11:40 +0200
committerRafał Miłecki <rafal@milecki.pl>2019-07-16 13:58:26 +0200
commitbf4eef46b45932c9ec1ea9ed9f2b4dc64062e7f9 (patch)
treeaa889e41fb74c3af40609b2d4e7eab8c0411fc46 /target/linux/orion
parent670ce65a44db4263ee21a3fce962c47378ef042b (diff)
downloadupstream-bf4eef46b45932c9ec1ea9ed9f2b4dc64062e7f9.tar.gz
upstream-bf4eef46b45932c9ec1ea9ed9f2b4dc64062e7f9.tar.bz2
upstream-bf4eef46b45932c9ec1ea9ed9f2b4dc64062e7f9.zip
orion: sysupgrade: change platform_check_image() args validation
sysupgrade passes image to check as argument so use $# instead of $ARGC. It also fits this function better as it checks $1 and not $ARGV. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/orion')
-rw-r--r--target/linux/orion/generic/base-files/lib/upgrade/platform.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/orion/generic/base-files/lib/upgrade/platform.sh b/target/linux/orion/generic/base-files/lib/upgrade/platform.sh
index db2330684d..cf1fad83a8 100644
--- a/target/linux/orion/generic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/orion/generic/base-files/lib/upgrade/platform.sh
@@ -6,7 +6,7 @@
# use default for platform_do_upgrade()
platform_check_image() {
- [ "${ARGC}" -gt 1 ] && { echo 'Too many arguments. Only flash file expected.'; return 1; }
+ [ "$#" -gt 1 ] && { echo 'Too many arguments. Only flash file expected.'; return 1; }
local hardware="$(board_name)"
local magic="$(get_magic_word "$1")"