integrate-distro.sh: Run sync on every file seperately

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2016-11-15 17:32:45 +00:00
commit 9d8469562b

View file

@ -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
}