diff options
| author | Michael Prokop <mika@grml.org> | 2010-04-02 16:33:23 +0200 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:08 +0100 |
| commit | 2924d9478b3e01ba65c7e963bf9d5c7a801ff1ae (patch) | |
| tree | efe68111d12766197a888a080bbc8a8d308d5b15 | |
| parent | 42c5f422167141f423134f1120409d5cf4967427 (diff) | |
| download | live-boot-2924d9478b3e01ba65c7e963bf9d5c7a801ff1ae.tar.gz live-boot-2924d9478b3e01ba65c7e963bf9d5c7a801ff1ae.zip | |
Prefer removable devices over non-removable devices, so scan them first.
| -rwxr-xr-x | scripts/live | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/live b/scripts/live index bae9193..8ad11bb 100755 --- a/scripts/live +++ b/scripts/live @@ -1627,8 +1627,20 @@ find_livefs () esac # or do the scan of block devices + # prefer removable devices over non-removable devices, so scan them first for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)") do + if [ "$(cat ${sysblock}/removable)" = "1" ] + then + removable_devices_to_scan="$removable_devices_to_scan $sysblock" + else + nonremovable_devices_to_scan="$nonremovable_devices_to_scan $sysblock" + fi + done + devices_to_scan="$removable_devices_to_scan $nonremovable_devices_to_scan" + + for sysblock in $devices_to_scan + do devname=$(sys2dev "${sysblock}") fstype=$(get_fstype "${devname}") |
