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
11 Index: live-boot-grml/scripts/live
12 ===================================================================
13 --- live-boot-grml.orig/scripts/live 2011-12-06 22:10:25.000000000 +0100
14 +++ live-boot-grml/scripts/live 2011-12-06 22:10:30.000000000 +0100
15 @@ -1810,7 +1810,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