diff options
| author | Daniel Baumann <daniel@debian.org> | 2009-03-12 11:11:53 +0100 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:04 +0100 |
| commit | bf9cbca7a18ab0a76be41994c8571cb06e14a55a (patch) | |
| tree | 0d721847cc5ad2a646b1a77aa3fe98234cdb1ca1 /scripts | |
| parent | b786a1129a4d5014389a603e00cd8ecabf63a10e (diff) | |
| download | live-boot-bf9cbca7a18ab0a76be41994c8571cb06e14a55a.tar.gz live-boot-bf9cbca7a18ab0a76be41994c8571cb06e14a55a.zip | |
Correcting check for usb when using removable-usb keyword.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/live | 23 |
1 files changed, 13 insertions, 10 deletions
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 |
