From 9d8469562bd40fa3bd89ec913478549c68476176 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 15 Nov 2016 17:32:45 +0000 Subject: [PATCH] integrate-distro.sh: Run sync on every file seperately Signed-off-by: Jan Lindemann --- scripts/integrate-distro.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 }