X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-helpers;h=06bd186f0c7577d68c5ba200417c82c2bd3fa7d9;hb=7e270900924ba420223a740260aa3bfdf4c66c64;hp=0e9b0d02d2cc655fdfbb270b2062fe1c629ea953;hpb=18d0aad577ed779ee27cfd0552c4096c3346a577;p=live-boot-grml.git diff --git a/scripts/live-helpers b/scripts/live-helpers index 0e9b0d0..06bd186 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -26,7 +26,7 @@ subdevices () sysblock=${1} r="" - for dev in "${sysblock}" "${sysblock}"/* + for dev in "${sysblock}"/* "${sysblock}" do if [ -e "${dev}/dev" ] then @@ -275,7 +275,7 @@ try_mount () fstype=$(get_fstype "${dev}") fi mount -t "${fstype}" -o "${opts}" "${dev}" "${mountp}" || \ - ( echo "SKIPPING: Cannot mount ${dev} on ${mountp}, fstype=${fstype}, options=${opts}" > live.log && return 0 ) + ( echo "SKIPPING: Cannot mount ${dev} on ${mountp}, fstype=${fstype}, options=${opts}" > live-boot.log && return 0 ) fi } @@ -297,13 +297,21 @@ find_cow_device () for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v fd) do + fulldevname=$(sys2dev "${sysblock}") + + if echo "${black_listed_devices}" | grep -q -w "${fulldevname}" + then + # skip this device entirely + break + fi + for dev in $(subdevices "${sysblock}") do devname=$(sys2dev "${dev}") if echo "${black_listed_devices}" | grep -q -w "${devname}" then - # skip this device enterely + # skip this subdevice break fi @@ -383,6 +391,14 @@ find_files () for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v fd) do + fulldevname=$(sys2dev "${sysblock}") + + if echo "${black_listed_devices}" | grep -q -w "${fulldevname}" + then + # skip this device entirely + break + fi + for dev in $(subdevices "${sysblock}") do devname=$(sys2dev "${dev}") @@ -390,7 +406,7 @@ find_files () if echo "${black_listed_devices}" | grep -q -w "${devname}" then - # skip this device enterely + # skip this subdevice break fi