From: Daniel Baumann Date: Thu, 12 Mar 2009 10:11:53 +0000 (+0100) Subject: Correcting check for usb when using removable-usb keyword. X-Git-Tag: debian/2.0.15-1~330 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=bf9cbca7a18ab0a76be41994c8571cb06e14a55a;p=live-boot-grml.git Correcting check for usb when using removable-usb keyword. --- diff --git a/scripts/live b/scripts/live index d125eae..ef7f64d 100755 --- a/scripts/live +++ b/scripts/live @@ -1402,26 +1402,29 @@ find_livefs () # first look at the one specified in the command line case "${LIVE_MEDIA}" in - removable) + removable-usb) for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)") do if [ "$(cat ${sysblock}/removable)" = "1" ] then - for dev in $(subdevices "${sysblock}") - do - if check_dev "${dev}" - then - return 0 - fi - done + if readlink ${sysblock}/device | grep -q usb + then + for dev in $(subdevices "${sysblock}") + do + if check_dev "${dev}" + then + return 0 + fi + done + fi fi done ;; - removable-usb) + removable) for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)") do - if [ "$(cat ${sysblock}/removable)" = "1" ] && readlink ${sysblock}/device | grep -q usb + if [ "$(cat ${sysblock}/removable)" = "1" ] then for dev in $(subdevices "${sysblock}") do