summaryrefslogtreecommitdiff
path: root/debian/initramfs-tools.preinst
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2010-12-28 22:13:52 +0100
committermaximilian attems <max@stro.at>2011-02-22 09:52:11 +0100
commit3c717fa0720b0f31968bd13f9de4529669a0201c (patch)
treeb90a22534c2e227c0cf44e63393930d0ec60efce /debian/initramfs-tools.preinst
parentec6a77f9ddc8c137f045311c200f254426821281 (diff)
initramfs-tools: preinst use blkid for uuid generation if around.
Prefer blkid over vol_id. I was tempted to nuke vol_id, but vol_id has been around for long and shouldn't be rm'ed on first occasion. Add note to do so. Wondering why this bug is not fatal, but it seems Debian Installer generates that file too. Closes: #609964 Signed-off-by: maximilian attems <max@stro.at> Reviewed-by: Michael Prokop <mika@debian.org>
Diffstat (limited to 'debian/initramfs-tools.preinst')
-rw-r--r--debian/initramfs-tools.preinst5
1 files changed, 4 insertions, 1 deletions
diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst
index bb58684..41aec09 100644
--- a/debian/initramfs-tools.preinst
+++ b/debian/initramfs-tools.preinst
@@ -20,7 +20,10 @@ case "$1" in
# First time install. Can we autodetect the RESUME partition?
if [ -r /proc/swaps ]; then
RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ')
- if command -v vol_id >/dev/null 2>&1; then
+ if command -v blkid >/dev/null 2>&1; then
+ UUID=$(blkid -s UUID -o value "$RESUME" || true)
+ # FIXME: post-Wheezy remove vol_id invocations
+ elif command -v vol_id >/dev/null 2>&1; then
UUID=$(vol_id -u "$RESUME" || true)
elif [ -x /lib/udev/vol_id ]; then
UUID=$(/lib/udev/vol_id -u "$RESUME" || true)