summaryrefslogtreecommitdiff
path: root/scripts/install/install-image-existing
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2023-04-03 08:04:19 +0100
committerGitHub <noreply@github.com>2023-04-03 08:04:19 +0100
commit2ec876ba9034c4e35538860d3128c6c13e185825 (patch)
tree246f8d3b118249f8e7a635cc959cc49e693c101a /scripts/install/install-image-existing
parente06078916c59b15a318447400d27d8158f4f70fd (diff)
parent36f08f78b806639827c9ae3a81275e057309bb1d (diff)
downloadvyatta-cfg-system-1.3.5.tar.gz
vyatta-cfg-system-1.3.5.zip
Merge pull request #199 from vyos/T5136-backport1.3.51.3.41.3.3
T5136: properly unmount filesystems after installation
Diffstat (limited to 'scripts/install/install-image-existing')
-rwxr-xr-xscripts/install/install-image-existing8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing
index d00d7735..feba6683 100755
--- a/scripts/install/install-image-existing
+++ b/scripts/install/install-image-existing
@@ -278,6 +278,14 @@ if [ -e "$DEF_GRUB" ]; then
fi
fi
+# unmount filesystems
+if ! try_unmount "--read-only $INST_ROOT $READ_ROOT"; then
+ failure_exit 'Failed to unmount new squashfs image.'
+fi
+
+# sync underlaying filesystems
+sync
+
logger -p local3.warning -t "SystemImage" "System Image $NEWNAME has been added and made the default boot image"
echo 'Done.'