makedist/functions.inc.sh: add a delay before unmounting rootfs on exit

This commit is contained in:
Silvan Calarco 2022-08-10 11:02:12 +02:00
parent 235ba99548
commit 1c58b57d36

View File

@ -137,7 +137,7 @@ function initialize_root_dir() {
#[ $MEDIA = "raw" ] && create_raw_filesystem $LOCALSTATEDIR/$MEDIA_NAME $MEDIA_SIZE 1024k $ROOTFS #[ $MEDIA = "raw" ] && create_raw_filesystem $LOCALSTATEDIR/$MEDIA_NAME $MEDIA_SIZE 1024k $ROOTFS
[ $MEDIA = "raw" ] && create_raw_disk_image $MEDIA_SIZE 1024k [ $MEDIA = "raw" ] && create_raw_disk_image $MEDIA_SIZE 1024k
trap "[ $LOOPDEV ] && losetup -d $LOOPDEV; chroot $MOUNTDIR /usr/bin/gpgconf --kill gpg-agent 2>/dev/null; [ -e $MOUNTDIR/proc/version ] && umount $MOUNTDIR/proc; [ -e $MOUNTDIR/dev/null ] && umount $MOUNTDIR/dev; [ -e $MOUNTDIR/run/systemd ] && umount $MOUNTDIR/run; [ -e $MOUNTDIR/sys/kernel ] && umount $MOUNTDIR/sys; [ \"$MOUNTDIR_TMPFS\" ] && umount $MOUNTDIR_TMPFS" 0 HUP INT QUIT ABRT KILL TERM trap "[ $LOOPDEV ] && losetup -d $LOOPDEV; chroot $MOUNTDIR /usr/bin/gpgconf --kill gpg-agent 2>/dev/null; sleep 10; [ -e $MOUNTDIR/proc/version ] && umount $MOUNTDIR/proc; [ -e $MOUNTDIR/dev/null ] && umount $MOUNTDIR/dev; [ -e $MOUNTDIR/run/systemd ] && umount $MOUNTDIR/run; [ -e $MOUNTDIR/sys/kernel ] && umount $MOUNTDIR/sys; [ \"$MOUNTDIR_TMPFS\" ] && umount $MOUNTDIR_TMPFS" 0 HUP INT QUIT ABRT KILL TERM
} }
function create_rpm_database() { function create_rpm_database() {