aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin/sysupgrade
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2019-08-16 17:02:58 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-04 13:43:05 +0200
commit2c77562af89a4b3f21be2e745a13cb647bfb7234 (patch)
tree64dd9f9869ecb1a7bf395fb533a6ba23821290d4 /package/base-files/files/sbin/sysupgrade
parentf25d164aca80ff7c21ebb99b95e5f7db11fe21b3 (diff)
downloadupstream-2c77562af89a4b3f21be2e745a13cb647bfb7234.tar.gz
upstream-2c77562af89a4b3f21be2e745a13cb647bfb7234.tar.bz2
upstream-2c77562af89a4b3f21be2e745a13cb647bfb7234.zip
treewide: sysupgrade: pass "save_partitions" option to the "sysupgrade" method
This explicitly lets stage2 know if partitions should be preserved. No more "touch /tmp/sysupgrade.always.overwrite.bootdisk.partmap" hack. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit b6f4cd57e19a8cfcd9ff52582b65164ce6213c3d)
Diffstat (limited to 'package/base-files/files/sbin/sysupgrade')
-rwxr-xr-xpackage/base-files/files/sbin/sysupgrade9
1 files changed, 2 insertions, 7 deletions
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index 15514159b3..c27c1fbc47 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -351,12 +351,6 @@ if [ $TEST -eq 1 ]; then
exit 0
fi
-if [ $SAVE_PARTITIONS -eq 0 ]; then
- touch /tmp/sysupgrade.always.overwrite.bootdisk.partmap
-else
- rm -f /tmp/sysupgrade.always.overwrite.bootdisk.partmap
-fi
-
install_bin /sbin/upgraded
v "Commencing upgrade. Closing all shell sessions."
@@ -371,7 +365,8 @@ else
\"path\": $(json_string "$IMAGE"),
\"command\": $(json_string "$COMMAND"),
\"options\": {
- \"save_config\": $SAVE_CONFIG
+ \"save_config\": $SAVE_CONFIG,
+ \"save_partitions\": $SAVE_PARTITIONS
}
}"
fi