diff options
author | Christian Breunig <christian@breunig.cc> | 2023-04-02 10:07:18 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-04-03 08:04:49 +0200 |
commit | 944c9a7217309451dfb73a92ec09f12e6772dbc1 (patch) | |
tree | de9e8fbe21cd8a3ec936262fb480a1bb9e20852c /scripts/install/install-image-existing | |
parent | e06078916c59b15a318447400d27d8158f4f70fd (diff) | |
download | vyatta-cfg-system-944c9a7217309451dfb73a92ec09f12e6772dbc1.tar.gz vyatta-cfg-system-944c9a7217309451dfb73a92ec09f12e6772dbc1.zip |
T5136: properly unmount filesystems after installation
(cherry picked from commit f34e9028252034cf17dbf380a2cded8bf14c71c2)
Diffstat (limited to 'scripts/install/install-image-existing')
-rwxr-xr-x | scripts/install/install-image-existing | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing index d00d7735..abbd1421 100755 --- a/scripts/install/install-image-existing +++ b/scripts/install/install-image-existing @@ -278,6 +278,15 @@ if [ -e "$DEF_GRUB" ]; then fi fi +# unmount filesystems +if ! try_unmount "--read-only $INST_ROOT $READ_ROOT"; then + rm -rf $REL_ROOT + 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.' |