diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/live-bottom/12fstab | 5 | ||||
| -rw-r--r-- | scripts/live-helpers | 29 |
2 files changed, 29 insertions, 5 deletions
diff --git a/scripts/live-bottom/12fstab b/scripts/live-bottom/12fstab index 22c11a0..b2f187c 100755 --- a/scripts/live-bottom/12fstab +++ b/scripts/live-bottom/12fstab @@ -66,7 +66,10 @@ then continue fi - /lib/udev/vol_id ${device%%[0-9]*} 2>/dev/null | grep -q "^ID_FS_USAGE=raid" && continue + if [ -x /lib/udev/vol_id ] + then + /lib/udev/vol_id ${device%%[0-9]*} 2>/dev/null | grep -q "^ID_FS_USAGE=raid" && continue + fi magic=$(/bin/dd if="${device}" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue diff --git a/scripts/live-helpers b/scripts/live-helpers index 0d97d10..84d460b 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -76,7 +76,17 @@ is_supported_fs () get_fstype () { - /lib/udev/vol_id -t ${1} 2>/dev/null + # udev >=146-1 no longer provides vol_id: + if [ -x /lib/udev/vol_id ] + then + /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 } where_is_mounted () @@ -339,10 +349,21 @@ find_cow_device () done fi - if [ "$(/lib/udev/vol_id -l ${devname} 2>/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" ] |
