diff options
author | maximilian attems <maks@debian.org> | 2010-01-30 19:54:13 +0100 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2010-01-30 19:54:13 +0100 |
commit | 49337bdc94ed5bc176338cfa793a868fcd33784c (patch) | |
tree | c9e47512167cd5a6f432c12b593c59e126432e2e | |
parent | 90c19d7bac748efdaab0355d4aa3a25b579bc0f2 (diff) | |
download | initramfs-tools-49337bdc94ed5bc176338cfa793a868fcd33784c.tar.gz initramfs-tools-49337bdc94ed5bc176338cfa793a868fcd33784c.zip |
scripts/local: Use blkid as backup fstype detection
if blkid is on initramfs use it.
Thanks to Joey Hess <joeyh@debian.org> for calling syntax.
Signed-off-by: maximilian attems <maks@debian.org>
-rw-r--r-- | scripts/local | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/local b/scripts/local index 7bc740f..feead1c 100644 --- a/scripts/local +++ b/scripts/local @@ -11,7 +11,9 @@ get_fstype () # vol_id has a more complete list of file systems, # but fstype is more robust eval $(fstype "${FS}" 2> /dev/null) - if [ "$FSTYPE" = "unknown" ] && [ -x /lib/udev/vol_id ]; then + if [ "$FSTYPE" = "unknown" ] && [ command -v blkid >/dev/null 2>&1 ]; 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=$? |