summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2016-01-20 23:59:20 +0000
committerBen Hutchings <ben@decadent.org.uk>2016-01-21 00:03:39 +0000
commit9c105f0a0ff9a794e10d511ca738c253e3d1f4a5 (patch)
tree6958a692b229febcef84523ceb70839691a8737a /scripts
parentceff05ef85a429c82cd9a4be7e025826d47e0c17 (diff)
Assume blkid is always installed, and remove fallbacks
udev has used blkid since version 142, so we can rely on it being present at build and boot time. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions11
1 files changed, 2 insertions, 9 deletions
diff --git a/scripts/functions b/scripts/functions
index 930a12c..2c36ed2 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -143,10 +143,8 @@ get_fstype ()
# but fstype is more robust
FSTYPE="unknown"
eval $(fstype "${FS}" 2> /dev/null)
- if [ "$FSTYPE" = "unknown" ] && command -v blkid >/dev/null 2>&1 ; then
+ if [ "$FSTYPE" = "unknown" ]; then
FSTYPE=$(blkid -o value -s TYPE "${FS}")
- elif [ "$FSTYPE" = "unknown" ] && [ -x /lib/udev/vol_id ]; then
- FSTYPE=$(/lib/udev/vol_id -t "${FS}" 2> /dev/null)
fi
RET=$?
@@ -299,12 +297,7 @@ resolve_device() {
case "$DEV" in
LABEL=* | UUID=* | PARTLABEL=* | PARTUUID=*)
- if command -v blkid >/dev/null 2>&1; then
- DEV="$(blkid -l -t "$DEV" -o device)" || return 1
- else
- log_warning_msg "blkid not present, so cannot resolve $DEV"
- return 1
- fi
+ DEV="$(blkid -l -t "$DEV" -o device)" || return 1
;;
esac
[ -e "$DEV" ] && echo "$DEV"