summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichael Prokop <mika@grml.org>2010-01-31 13:49:33 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:48:06 +0100
commit45a44dfbaec9d819567afa12238d9181dfbff5e6 (patch)
tree63efe1efbcc9b41badb68336dd28595379f1d08b /scripts
parente4b9ce3049d5eceb4cb815087062a5bed0d6c2ce (diff)
downloadlive-boot-45a44dfbaec9d819567afa12238d9181dfbff5e6.tar.gz
live-boot-45a44dfbaec9d819567afa12238d9181dfbff5e6.zip
Switch from vol_id to blkid if using udev >=146-1 (Closes: #555529).
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/live-bottom/12fstab5
-rw-r--r--scripts/live-helpers29
2 files changed, 29 insertions, 5 deletions
diff --git a/scripts/live-bottom/12fstab b/scripts/live-bottom/12fstab
index 22c11a0..b2f187c 100755
--- a/scripts/live-bottom/12fstab
+++ b/scripts/live-bottom/12fstab
@@ -66,7 +66,10 @@ then
continue
fi
- /lib/udev/vol_id ${device%%[0-9]*} 2>/dev/null | grep -q "^ID_FS_USAGE=raid" && continue
+ if [ -x /lib/udev/vol_id ]
+ then
+ /lib/udev/vol_id ${device%%[0-9]*} 2>/dev/null | grep -q "^ID_FS_USAGE=raid" && continue
+ fi
magic=$(/bin/dd if="${device}" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue
diff --git a/scripts/live-helpers b/scripts/live-helpers
index 0d97d10..84d460b 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -76,7 +76,17 @@ is_supported_fs ()
get_fstype ()
{
- /lib/udev/vol_id -t ${1} 2>/dev/null
+ # udev >=146-1 no longer provides vol_id:
+ if [ -x /lib/udev/vol_id ]
+ then
+ /lib/udev/vol_id -t ${1} 2>/dev/null
+ else
+ eval $(blkid -o udev "${1}")
+ if [ -n "$ID_FS_TYPE" ]
+ then
+ echo "${ID_FS_TYPE}"
+ fi
+ fi
}
where_is_mounted ()
@@ -339,10 +349,21 @@ find_cow_device ()
done
fi
- if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${pers_label}" ]
+ # udev >=146-1 no longer provides vol_id:
+ if [ -x /lib/udev/vol_id ]
then
- echo "${devname}"
- return 0
+ if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${pers_label}" ]
+ then
+ echo "${devname}"
+ return 0
+ fi
+ else
+ eval $(blkid -o udev "${devname}")
+ if [ "$ID_FS_LABEL" = "${pers_label}" ]
+ then
+ echo "${devname}"
+ return 0
+ fi
fi
if [ "${PERSISTENT}" = "nofiles" ]