Skip to content
Browse files

debian/patches/04_drop_usage_of_fstype.dpatch: address vol_id -> blki…

…d issue
  • Loading branch information...
1 parent 9c3b1de commit 1710927cf8849e6967e6b104e52cac5892115c73 @mika mika committed Nov 13, 2009
Showing with 47 additions and 9 deletions.
  1. +3 −1 debian/changelog
  2. +44 −8 debian/patches/04_drop_usage_of_fstype.dpatch
View
4 debian/changelog
@@ -1,8 +1,10 @@
live-initramfs (1.157.4-1grml.00) unstable; urgency=low
* Synchronise with Debian's version 1.157.4-1.
+ * Update debian/patches/04_drop_usage_of_fstype.dpatch to address
+ vol_id -> blkid issue (see #555529).
- -- Michael Prokop <mika@grml.org> Fri, 13 Nov 2009 21:00:07 +0100
+ -- Michael Prokop <mika@grml.org> Fri, 13 Nov 2009 23:29:39 +0100
live-initramfs (1.157.3-1grml.01) unstable; urgency=low
View
52 debian/patches/04_drop_usage_of_fstype.dpatch
@@ -4,13 +4,14 @@
## All lines beginning with `## DP:' are a description of the patch.
## DP: Avoid the use of fstype in a running live system, as it's
## DP: a executable and not a shell function and causes problems
-## DP: for example within live-snapshot
+## DP: for example within live-snapshot.
+## DP: Further switch from vol_id to blkid if using udev >=146-1.
@DPATCH@
-
---- a/scripts/live-helpers
-+++ b/scripts/live-helpers
-@@ -76,24 +76,6 @@ is_supported_fs ()
+diff -urNad live-initramfs-grml~/scripts/live-helpers live-initramfs-grml/scripts/live-helpers
+--- live-initramfs-grml~/scripts/live-helpers 2009-11-13 23:45:28.000000000 +0100
++++ live-initramfs-grml/scripts/live-helpers 2009-11-13 23:59:36.524643320 +0100
+@@ -76,25 +76,17 @@
get_fstype ()
{
@@ -27,11 +28,46 @@
- eval $(fstype ${1} 2>/dev/null)
-
- if [ "${FSTYPE}" != "unknown" ]
-- then
++ # udev >=146-1 no longer provides vol_id:
++ if [ -x /lib/udev/vol_id ]
+ then
- echo ${FSTYPE}
- return 0
-- fi
++ /lib/udev/vol_id -t ${1} 2>/dev/null
++ else
++ eval $(blkid -o udev "${1}")
++ if [ -n "$ID_FS_TYPE" ]
++ then
++ echo "${ID_FS_TYPE}"
++ fi
+ fi
-
- /lib/udev/vol_id -t ${1} 2>/dev/null
+- /lib/udev/vol_id -t ${1} 2>/dev/null
}
+ where_is_mounted ()
+@@ -357,10 +349,21 @@
+ done
+ fi
+
+- if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${pers_label}" ]
++ # udev >=146-1 no longer provides vol_id:
++ if [ -x /lib/udev/vol_id ]
+ then
+- echo "${devname}"
+- return 0
++ if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${pers_label}" ]
++ then
++ echo "${devname}"
++ return 0
++ fi
++ else
++ eval $(blkid -o udev "${devname}")
++ if [ "$ID_FS_LABEL" = "${pers_label}" ]
++ then
++ echo "${devname}"
++ return 0
++ fi
+ fi
+
+ if [ "${PERSISTENT}" = "nofiles" ]

0 comments on commit 1710927

Please sign in to comment.
Something went wrong with that request. Please try again.