gluon/patches/lede/0033-base-files-upgrade-correctly-handle-nand_do_upgrade-argument-passed-from-preupgrade.patch
Matthias Schiffer b943691488
modules: update LEDE
788312ca59c5 uqmi: ensure CID is a numeric value before proceeding
b934aa2f2144 kernel: update 17.01 kernel to 4.4.116
b3b16c8ce5c6 uqmi: use built-in command for data-link verification
e9eb219e5a07 uqmi: use correct value for connection checking
5661ac1de4d8 uqmi: use general method for state cleaning
7c259fb98018 uqmi: silence error on pin verification
046222dfaf12 uqmi: fix raw-ip mode for newer lte modems
0393009ec84e net: uqmi: fix blocking in endless loops when unplugging device
31ae7381b8db kernel: refresh patches
3b227103e6a3 kernel: backport raw-ip mode for newer QMI LTE modems
f60be720772c base-files: don't evaluate block-device uevent
623cdc4ffeef ramips: backport mt7530/762x switch fixes
b15d54e659b4 perf: use libunwind
566ff9e6ee69 libunwind: enable build for arm
2018-02-20 23:05:41 +01:00

34 lines
1.5 KiB
Diff

From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 10 Jul 2017 10:35:19 +0200
Subject: base-files: upgrade: correctly handle nand_do_upgrade argument passed from preupgrade
Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index af7682c29e005c6ca47b91e9be2d60c359a90d05..6ccd84c5a95348124412adc8bf41d3fa4894435a 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -222,7 +222,7 @@ default_do_upgrade() {
do_upgrade_stage2() {
v "Performing system upgrade..."
if [ -n "$do_upgrade" ]; then
- $do_upgrade "$IMAGE"
+ eval "$do_upgrade"
elif type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
platform_do_upgrade "$IMAGE"
else
diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh
index 1e69c8f9657b39adf2a2c33bd9bac9303bcbc3d7..72f0fe0e10312e74ce085ad53f0adceb921fd013 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -289,7 +289,7 @@ nand_do_upgrade() {
# hook; this piece of code handles scripts that haven't been
# updated. All scripts should gradually move to call nand_do_upgrade
# from platform_do_upgrade instead.
- export do_upgrade=nand_do_upgrade
+ export do_upgrade="nand_do_upgrade '$1'"
return
fi