From 53c862705dc04b6a499c2ed47158bcc20954184c Mon Sep 17 00:00:00 2001 From: Thibaut VARENE Date: Wed, 15 Feb 2017 13:23:27 +0100 Subject: [PATCH] ar71xx: remove bogus "rb*)" catch-all from platform.sh This patch replaces a dangerous catch-all with the exhaustive list of devices. Signed-off-by: Thibaut VARENE --- .../ar71xx/base-files/lib/upgrade/platform.sh | 62 ++++++++++++++++--- 1 file changed, 54 insertions(+), 8 deletions(-) diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 0175f6d32c..7423c38c5f 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -486,7 +486,33 @@ platform_check_image() { tew-673gru) dir825b_check_image "$1" && return 0 ;; - rb*) + rb-411|\ + rb-411u|\ + rb-433|\ + rb-433u|\ + rb-435g|\ + rb-450|\ + rb-450g|\ + rb-493|\ + rb-493g|\ + rb-750|\ + rb-750gl|\ + rb-751|\ + rb-751g|\ + rb-911g-2hpnd|\ + rb-911g-5hpnd|\ + rb-911g-5hpacd|\ + rb-912uag-2hpnd|\ + rb-912uag-5hpnd|\ + rb-951g-2hnd|\ + rb-951ui-2hnd|\ + rb-2011l|\ + rb-2011uas|\ + rb-2011uias|\ + rb-2011uas-2hnd|\ + rb-2011uias-2hnd|\ + rb-sxt2n|\ + rb-sxt5n) nand_do_platform_check routerboard $1 return $? ;; @@ -621,16 +647,36 @@ platform_pre_upgrade() { local board=$(ar71xx_board_name) case "$board" in - rb-750-r2|\ - rb-750up-r2|\ - rb-941-2nd|\ - rb-951ui-2nd|\ - rb-mapl-2nd) - ;; - rb*|\ c-60|\ nbg6716|\ r6100|\ + rb-411|\ + rb-411u|\ + rb-433|\ + rb-433u|\ + rb-435g|\ + rb-450|\ + rb-450g|\ + rb-493|\ + rb-493g|\ + rb-750|\ + rb-750gl|\ + rb-751|\ + rb-751g|\ + rb-911g-2hpnd|\ + rb-911g-5hpnd|\ + rb-911g-5hpacd|\ + rb-912uag-2hpnd|\ + rb-912uag-5hpnd|\ + rb-951g-2hnd|\ + rb-951ui-2hnd|\ + rb-2011l|\ + rb-2011uas|\ + rb-2011uias|\ + rb-2011uas-2hnd|\ + rb-2011uias-2hnd|\ + rb-sxt2n|\ + rb-sxt5n|\ wndr3700v4|\ wndr4300) nand_do_upgrade "$1" -- 2.30.2