dmsquash-live-root: use blkid to determine fstype of images
authorHarald Hoyer <harald@redhat.com>
Fri, 2 Sep 2011 17:01:16 +0000 (19:01 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 2 Sep 2011 18:01:50 +0000 (20:01 +0200)
prevents:
dracut: FATAL: cannot mount live image (unknown filesystem type)
https://bugzilla.redhat.com/show_bug.cgi?id=735199

modules.d/90dmsquash-live/dmsquash-live-root

index 90e633c..2b6c0e2 100755 (executable)
@@ -45,9 +45,7 @@ fi
 
 # determine filesystem type for a filesystem image
 det_img_fs() {
-    local _img="$1" _loop=$(losetup -f) _fs
-    losetup $_loop $_img; _fs=$(det_fs $_loop); losetup -d $_loop
-    echo $_fs
+    blkid -s TYPE -u noraid -o value "$1"
 }
 
 for arg in $CMDLINE; do case $arg in ro|rw) liverw=$arg ;; esac; done