Use udev's vol_id instead of fstype
authorMichael Prokop <mika@grml.org>
Mon, 24 Nov 2008 10:47:30 +0000 (11:47 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 24 Nov 2008 10:47:30 +0000 (11:47 +0100)
fstype from grml works different than  /usr/lib/klibc/bin/fstype.
Whereas controlling the way fstype works in initramfs can be
controlled the running system won't work with for example live-snapshot.
So let's avoid any problems by using only vol_id.

debian/patches/04_fix_no_medium_found_error.dpatch

index fba7181..a57da2f 100755 (executable)
@@ -8,15 +8,28 @@
 
 --- a/scripts/live-helpers
 +++ b/scripts/live-helpers
-@@ -77,9 +77,9 @@ get_fstype ()
-           return
-       fi
+@@ -67,24 +67,6 @@ is_supported_fs ()
  
+ get_fstype ()
+ {
+-      local FSTYPE
+-      local FSSIZE
+-
+-      # fstype misreports LUKS devices
+-      if is_luks "${1}"
+-      then
+-          /lib/udev/vol_id -t ${1} 2>/dev/null
+-          return
+-      fi
+-
 -      eval $(fstype < ${1} 2>/dev/null)
-+      eval $(fstype ${1} 2>/dev/null)
+-
 -      if [ "${FSTYPE}" != "unknown" ]
-+      if [ "${FSTYPE}" != "unknown" -a -n "${FSTYPE}" ]
-       then
-               echo ${FSTYPE}
-               return 0
+-      then
+-              echo ${FSTYPE}
+-              return 0
+-      fi
+-
+       /lib/udev/vol_id -t ${1} 2>/dev/null
+ }