From 2c77562af89a4b3f21be2e745a13cb647bfb7234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 16 Aug 2019 17:02:58 +0200 Subject: treewide: sysupgrade: pass "save_partitions" option to the "sysupgrade" method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit b6f4cd57e19a8cfcd9ff52582b65164ce6213c3d) --- package/base-files/files/sbin/sysupgrade | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'package/base-files/files/sbin') 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 -- cgit v1.2.3