diff --git a/scripts/integrate-distro.sh b/scripts/integrate-distro.sh index 7fe55791..1d69c2a9 100644 --- a/scripts/integrate-distro.sh +++ b/scripts/integrate-distro.sh @@ -817,10 +817,13 @@ unmount_devices() local devices="$ssh_auth_sock /srv/ftp /proc /sys /dev /boot /" [ "$1" ] && devices="$@" local sync=/usr/bin/sync - [ -x $root/$sync ] && run_chroot $sync + [ -x $root/$sync ] || sync="" local d for d in $devices; do - check_mount $d && run umount $root$d + check_mount $d && { + [ "$sync" -a -e $root$d ] && run $sync -f $root$d + run umount $root$d + } done rm -f $ssh_auth_sock }