From: Luiz Angelo Daros de Luca Date: Wed, 11 Nov 2020 03:54:33 +0000 (-0300) Subject: dmsquash-live-root: squashfs in bare device X-Git-Tag: 052~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51b36f56d86825b308c0a32e7cd35ca73a91df7d;p=thirdparty%2Fdracut.git dmsquash-live-root: squashfs in bare device Check if dev in root=live: might be already the squashfs image. Signed-off-by: Luiz Angelo Daros de Luca --- diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh index d686d2551..1cb200caa 100755 --- a/modules.d/90dmsquash-live/dmsquash-live-root.sh +++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh @@ -78,7 +78,11 @@ if [ -f $livedev ]; then esac [ -e /sys/fs/$fstype ] || modprobe $fstype else - if [ "$(blkid -o value -s TYPE $livedev)" != "ntfs" ]; then + livedev_fstype=$(blkid -o value -s TYPE $livedev) + if [ "$livedev_fstype" = "squashfs" ]; then + # no mount needed - we've already got the LiveOS image in $livedev + SQUASHED=$livedev + elif [ "$livedev_fstype" != "ntfs" ]; then mount -n -t $fstype -o ${liverw:-ro} $livedev /run/initramfs/live else # Symlinking /usr/bin/ntfs-3g as /sbin/mount.ntfs seems to boot