X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-helpers;h=84d460bce61440622630c002877309ee707f5a36;hb=f1d90cde9113d2fc012b7234e698e88e4e3ecfc3;hp=fbf61fea8dfe4dd101da3ce0bc6cbc1a50c04352;hpb=3da10dcee61c32653acb775a0fc8348ea5287c5a;p=live-boot-grml.git diff --git a/scripts/live-helpers b/scripts/live-helpers index fbf61fe..84d460b 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -76,25 +76,17 @@ is_supported_fs () get_fstype () { - local FSTYPE - local FSSIZE - - # fstype misreports LUKS devices - if is_luks "${1}" - then - /lib/udev/vol_id -t ${1} 2>/dev/null - return - fi - - eval $(fstype ${1} 2>/dev/null) - - if [ "${FSTYPE}" != "unknown" ] + # udev >=146-1 no longer provides vol_id: + if [ -x /lib/udev/vol_id ] then - echo ${FSTYPE} - return 0 + /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 - - /lib/udev/vol_id -t ${1} 2>/dev/null } where_is_mounted () @@ -328,21 +320,14 @@ find_cow_device () fi # Checking for a luks device - if [ -e /sbin/cryptsetup ] && /sbin/cryptsetup isLuks ${devname} + if [ "${PERSISTENT}" = "cryptsetup" ] && [ -e /sbin/cryptsetup ] && /sbin/cryptsetup isLuks ${devname} then while true do load_keymap - echo -n "Enter passphrase for ${pers_label} on ${devname}: " >&6 - read -s passphrase - echo "${passphrase}" > /tmp/passphrase - unset passphrase - exec 9/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" ] then # do not mount the device to find for image files # just skip this - break + continue fi case "$(get_fstype ${devname})" in