From: Frederick Grose Date: Tue, 30 Apr 2019 02:06:51 +0000 (-0400) Subject: iso-scan: Release resources on iso-scan boots with rd.live.ram X-Git-Tag: 050~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c8c807db1572baca0fe745e0ca82af83fa21072;p=thirdparty%2Fdracut.git iso-scan: Release resources on iso-scan boots with rd.live.ram Unmounting the image iso, detaching its loop device, and unmounting its parent partition can simplify installation to the parent disk. Note that programs or scripts using the /run/initramfs/live mount point will fail. --- diff --git a/modules.d/90dmsquash-live/apply-live-updates.sh b/modules.d/90dmsquash-live/apply-live-updates.sh index 3df2d4ad8..838445ef2 100755 --- a/modules.d/90dmsquash-live/apply-live-updates.sh +++ b/modules.d/90dmsquash-live/apply-live-updates.sh @@ -18,3 +18,9 @@ if [ -h /dev/root ] && [ -d /run/initramfs/live/updates -o -d /updates ]; then done umount $NEWROOT/run fi +# release resources on iso-scan boots with rd.live.ram +if [ -d /run/initramfs/isoscan ] && + [ -f /run/initramfs/squashed.img -o -f /run/initramfs/rootfs.img ]; then + umount --detach-loop /run/initramfs/live + umount /run/initramfs/isoscan +fi