From 3eb5ad8d680f54dadb64994ec2c2e481c06211d2 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 23 Jun 2009 00:39:52 +0200 Subject: preinst: Don't hardcode vol_id cmd use command instead of hardcoded path, fixes lintian error: command-with-path-in-maintainer-script Signed-off-by: maximilian attems --- debian/initramfs-tools.preinst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 8095b88..bb58684 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -20,8 +20,8 @@ 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 [ -x /sbin/vol_id ]; then - UUID=$(/sbin/vol_id -u "$RESUME" || true) + if 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) fi -- cgit v1.2.3