[Probes/blkid] Décodage des LABEL= et UUID=

darcs-hash:20110208233742-ffbb2-e3f531a42db9d61ed45d6bc27963985f32e48678.gz
This commit is contained in:
Nicolas Dandrimont 2011-02-09 00:37:42 +01:00
parent ad649fa38a
commit 2c12e8af85

14
Probes/blkid Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
# Mapping entre LABEL=toto, UUID=t-a-t-a et /dev/sdxx
if [ -x /sbin/blkid ]; then
echo "group:blkid"
(cat /etc/fstab; cat /etc/fstab.local) | \
awk '/^[A-Z]+=/{print $1}' | \
sort | \
uniq | \
while read blockid; do
echo -n "$blockid "
/sbin/blkid -t "$blockid" -o device
done
fi