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
13 @@ -1577,7 +1577,12 @@ check_dev ()
15 if is_supported_fs ${fstype}
17 - devuid=$(blkid -o value -s UUID "$devname")
19 + if command -v blkid >/dev/null 2>&1 ; then
20 + devuid=$(blkid -o value -s UUID "${devname}")
21 + elif [ -x /lib/udev/vol_id ]; then
22 + devuid=$(/lib/udev/vol_id --uuid "${devname}" 2>/dev/null)
24 [ -n "$devuid" ] && grep -qs "\<$devuid\>" $tried && continue
25 mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
26 [ -n "$devuid" ] && echo "$devuid" >> $tried