mirror of https://github.com/hak5/openwrt.git
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>master
parent
670ce65a44
commit
bf4eef46b4
|
@ -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")"
|
||||
|
|
Loading…
Reference in New Issue