summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2009-06-23 00:39:52 +0200
committermaximilian attems <maks@debian.org>2009-06-23 00:40:58 +0200
commit3eb5ad8d680f54dadb64994ec2c2e481c06211d2 (patch)
treed66d54f23ae0c6aef7c22c3c2824d07ce0937396
parent4a4dda7aff43b9fdb52633c1af877fa69884fc33 (diff)
downloadinitramfs-tools-3eb5ad8d680f54dadb64994ec2c2e481c06211d2.tar.gz
initramfs-tools-3eb5ad8d680f54dadb64994ec2c2e481c06211d2.zip
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 <maks@debian.org>
-rw-r--r--debian/initramfs-tools.preinst4
1 files 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