X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-helpers;h=0e9b0d02d2cc655fdfbb270b2062fe1c629ea953;hb=274ce8e4e2b902e4e7b4871c284cee0285cf18a6;hp=d82efa59a566983db6ab77dcfcecbf21a75a26e4;hpb=b81de07d942f74afdefd6f60c9cf4e0a09109c50;p=live-boot-grml.git diff --git a/scripts/live-helpers b/scripts/live-helpers index d82efa5..0e9b0d0 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -1,4 +1,4 @@ -# live-initramfs helper functions, used by live-initramfs on boot and by live-snapshot +# live-boot helper functions, used by live-boot on boot and by live-snapshot if [ ! -x "/bin/fstype" ] then @@ -76,15 +76,7 @@ is_supported_fs () get_fstype () { - # udev (>= 146) no longer provides vol_id - if [ -x /lib/udev/vol_id ] - then - # lenny - /lib/udev/vol_id -t ${1} 2>/dev/null - else - # squeeze - /sbin/blkid -s TYPE -o value $1 2>/dev/null - fi + /sbin/blkid -s TYPE -o value $1 2>/dev/null } where_is_mounted () @@ -309,7 +301,7 @@ find_cow_device () do devname=$(sys2dev "${dev}") - if echo "${black_listed_devices}" | grep -q "${devname}" + if echo "${black_listed_devices}" | grep -q -w "${devname}" then # skip this device enterely break @@ -345,22 +337,10 @@ find_cow_device () done fi - # udev (>= 146) no longer provides vol_id - if [ -x /lib/udev/vol_id ] + if [ "$(/sbin/blkid -s LABEL -o value $devname 2>/dev/null)" = "${pers_label}" ] then - # lenny - if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${pers_label}" ] - then - echo "${devname}" - return 0 - fi - else - # squeeze - if [ "$(/sbin/blkid -s LABEL -o value $devname 2>/dev/null)" = "${pers_label}" ] - then - echo "${devname}" - return 0 - fi + echo "${devname}" + return 0 fi if [ "${PERSISTENT}" = "nofiles" ] @@ -408,7 +388,7 @@ find_files () devname=$(sys2dev "${dev}") devfstype="$(get_fstype ${devname})" - if echo "${black_listed_devices}" | grep -q "${devname}" + if echo "${black_listed_devices}" | grep -q -w "${devname}" then # skip this device enterely break