X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-helpers;h=807553a694becf5eff5457fe6d92cc7851d03e72;hb=f0d756e45675fbf829e8ee71ded7c42126dd43ab;hp=504a3f4e5348709693d6a3b6e6b34e1fbb269ad0;hpb=0da6f5242d43792dbf05f91355ad6625c5485183;p=live-boot-grml.git diff --git a/scripts/live-helpers b/scripts/live-helpers index 504a3f4..807553a 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -34,6 +34,13 @@ get_fstype () local FSTYPE local FSSIZE + # fstype misreports LUKS devices + is_luks "${1}" + if [ $? -eq 0 ]; then + /lib/udev/vol_id -t ${1} 2>/dev/null + return + fi + eval $(fstype < ${1}) if [ "${FSTYPE}" != "unknown" ] @@ -306,3 +313,16 @@ get_mac () echo ${mac} } + +is_luks() +{ + devname="${1}" + if [ -x /sbin/cryptsetup ] + then + /sbin/cryptsetup isLuks "${devname}" 2>/dev/null + return $? + else + return 1 + fi + +}