diff options
Diffstat (limited to 'scripts/install/install-image-existing')
-rwxr-xr-x | scripts/install/install-image-existing | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing index d00d7735..7cf0b4db 100755 --- a/scripts/install/install-image-existing +++ b/scripts/install/install-image-existing @@ -189,9 +189,9 @@ if [ $space_avail -gt $space_needed_configdata ]; then resp=$(get_response "Yes" "Yes No Y N") if [ "$resp" == 'yes' ] || [ "$resp" == 'y' ]; then echo 'Copying current configuration...' - ndir=${INST_ROOT}/${VYATTA_NEW_CFG_DIR} + ndir=${INST_ROOT}/${VYATTA_CFG_DIR} mkdir -p $ndir - find $VYATTA_NEW_CFG_DIR -maxdepth 1 -mindepth 1 \ + find $VYATTA_CFG_DIR -maxdepth 1 -mindepth 1 \ -exec cp '-a' '{}' "$ndir/" ';' # Set the upgraded flag @@ -201,7 +201,7 @@ if [ $space_avail -gt $space_needed_configdata ]; then chmod -R 775 $ndir # Return original permissions for private files in config/auth. T2713 - rsync -a ${VYATTA_NEW_CFG_DIR}/auth/ ${ndir}/auth/ + rsync -a ${VYATTA_CFG_DIR}/auth/ ${ndir}/auth/ fi done @@ -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.' |