Blame 0037-dmsquash-live-root-use-blkid-to-determine-fstype-of-.patch

Harald Hoyer 55891e
From 380b8b516e719e32f766ad78c88009bc589126ec 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:01:16 +0200
Harald Hoyer 55891e
Subject: [PATCH] dmsquash-live-root: use blkid to determine fstype of images
Harald Hoyer 55891e
Harald Hoyer 55891e
prevents:
Harald Hoyer 55891e
dracut: FATAL: cannot mount live image (unknown filesystem type)
Harald Hoyer 55891e
https://bugzilla.redhat.com/show_bug.cgi?id=735199
Harald Hoyer 55891e
---
Harald Hoyer 55891e
 modules.d/90dmsquash-live/dmsquash-live-root |    4 +---
Harald Hoyer 55891e
 1 files changed, 1 insertions(+), 3 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 90e633c..2b6c0e2 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
@@ -45,9 +45,7 @@ fi
Harald Hoyer 55891e
 
Harald Hoyer 55891e
 # determine filesystem type for a filesystem image
Harald Hoyer 55891e
 det_img_fs() {
Harald Hoyer 55891e
-    local _img="$1" _loop=$(losetup -f) _fs
Harald Hoyer 55891e
-    losetup $_loop $_img; _fs=$(det_fs $_loop); losetup -d $_loop
Harald Hoyer 55891e
-    echo $_fs
Harald Hoyer 55891e
+    blkid -s TYPE -u noraid -o value "$1"
Harald Hoyer 55891e
 }
Harald Hoyer 55891e
 
Harald Hoyer 55891e
 for arg in $CMDLINE; do case $arg in ro|rw) liverw=$arg ;; esac; done