diff options
| author | Daniel Baumann <daniel@debian.org> | 2009-03-12 08:07:48 +0100 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:04 +0100 |
| commit | 46d3944369fb7436c4e7129df65f2f1a6dbf3ffc (patch) | |
| tree | 100eee8fe8f5a571186824bc820a4e4cac24efa9 /scripts | |
| parent | f5302bcc273b3b7f557e3b30c6457d9c20d05b56 (diff) | |
| download | live-boot-46d3944369fb7436c4e7129df65f2f1a6dbf3ffc.tar.gz live-boot-46d3944369fb7436c4e7129df65f2f1a6dbf3ffc.zip | |
Also allowing to use the removable keyword for specifying a live media.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/live | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/scripts/live b/scripts/live index 5d5b978..d7c2347 100755 --- a/scripts/live +++ b/scripts/live @@ -1401,13 +1401,33 @@ find_livefs () fi # first look at the one specified in the command line - if [ ! -z "${LIVE_MEDIA}" ] - then - if check_dev "null" "${LIVE_MEDIA}" "skip_uuid_check" - then - return 0 - fi - fi + case "${LIVE_MEDIA}" in + removable) + 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 + fi + done + ;; + + *) + if [ ! -z "${LIVE_MEDIA}" ] + then + if check_dev "null" "${LIVE_MEDIA}" "skip_uuid_check" + then + return 0 + fi + fi + ;; + esac # or do the scan of block devices for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)") |
