Blame 0038-dmsquash-live-root-load-filesystem-modules-before-mo.patch

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