From baa5c1136310b47ca2ca91eb377fa058dd2793c7 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 2 Sep 2011 19:16:17 +0200
Subject: [PATCH] dmsquash-live-root: load filesystem modules before mounting
loop images
might prevent https://bugzilla.redhat.com/show_bug.cgi?id=735199
---
modules.d/90dmsquash-live/dmsquash-live-root | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root b/modules.d/90dmsquash-live/dmsquash-live-root
index 2b6c0e2..b704139 100755
--- a/modules.d/90dmsquash-live/dmsquash-live-root
+++ b/modules.d/90dmsquash-live/dmsquash-live-root
@@ -54,11 +54,13 @@ mkdir -m 0755 -p /run/initramfs/live
if [ -f $livedev ]; then
# no mount needed - we've already got the LiveOS image in initramfs
# check filesystem type and handle accordingly
- case `det_img_fs $livedev` in
- squashfs) SQUASHED=$livedev ;;
+ fstype=$(det_img_fs $livedev)
+ case $fstype in
+ squashfs) SQUASHED=$livedev;;
auto) die "cannot mount live image (unknown filesystem type)" ;;
*) FSIMG=$livedev ;;
esac
+ [ -e /sys/fs/$fstype ] || modprobe $fstype
else
mount -n -t $fstype -o ${liverw:-ro} $livedev /run/initramfs/live
if [ "$?" != "0" ]; then