1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 14_no_blkid_on_lenny.dpatch by Michael Prokop <mika@grml.org>
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: util-linux of lenny doesn't ship the initramfs-tools file
6 ## DP: /usr/share/initramfs-tools/hooks/utillinux yet which ensures
7 ## DP: that blkid is available, so therefore fall back to
8 ## DP: /lib/udev/vol_id in /scripts/live as well
12 ===================================================================
13 --- a/scripts/live 2011-07-24 22:08:03.000000000 +0200
14 +++ b/scripts/live 2011-07-24 22:08:06.000000000 +0200
15 @@ -1680,7 +1680,12 @@
17 if is_supported_fs ${fstype}
19 - devuid=$(blkid -o value -s UUID "$devname")
21 + if command -v blkid >/dev/null 2>&1 ; then
22 + devuid=$(blkid -o value -s UUID "${devname}")
23 + elif [ -x /lib/udev/vol_id ]; then
24 + devuid=$(/lib/udev/vol_id --uuid "${devname}" 2>/dev/null)
26 [ -n "$devuid" ] && grep -qs "\<$devuid\>" $tried && continue
27 mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
28 [ -n "$devuid" ] && echo "$devuid" >> $tried