diff options
| author | Daniel Baumann <daniel@debian.org> | 2007-10-09 00:24:11 +0200 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:31:05 +0100 |
| commit | 72a19f689e43318589a7c2614848778a59629b76 (patch) | |
| tree | 404f688c378f9a7281c742e8bafee70126be2f00 /scripts | |
| parent | 7340552de6a8e238e54582722ccf7b74d12a212b (diff) | |
| download | live-boot-72a19f689e43318589a7c2614848778a59629b76.tar.gz live-boot-72a19f689e43318589a7c2614848778a59629b76.zip | |
Merging casper 1.108.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/live | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/scripts/live b/scripts/live index ebac3ae..16a54c2 100755 --- a/scripts/live +++ b/scripts/live @@ -79,6 +79,9 @@ Arguments () export USERFULLNAME LIVECONF ;; + ignore_uuid) + IGNORE_UUID="Yes" ;; + ip=*) STATICIP="${ARGUMENT#ip=}" @@ -434,6 +437,22 @@ is_live_path () return 1 } +matches_uuid() { + if [ "$IGNORE_UUID" ] || [ ! -e /conf/uuid.conf ]; then + return 0 + fi + path="$1" + uuid="$(cat /conf/uuid.conf)" + for try_uuid_file in "$mountpoint/.disk/casper-uuid"*; do + [ -e "$try_uuid_file" ] || continue + try_uuid="$(cat "$try_uuid_file")" + if [ "$uuid" = "$try_uuid" ]; then + return 0 + fi + done + return 1 +} + get_backing_device () { case "${1}" in @@ -983,6 +1002,7 @@ check_dev () { sysdev="${1}" devname="${2}" + skip_uuid_check="${3}" if [ -z "${devname}" ] then @@ -1002,7 +1022,8 @@ check_dev () mount -t ${fstype} -o ro,noatime,nodiratime "${devname}" ${mountpoint} || continue if is_live_path ${mountpoint} - then + if is_live_path $mountpoint && \ + ([ "$skip_uuid_check" ] || matches_uuid $mountpoint); then echo ${mountpoint} return 0 else @@ -1025,7 +1046,7 @@ find_livefs () # first look at the one specified in the command line if [ ! -z "${LIVE_MEDIA}" ] then - if check_dev "null" "${LIVE_MEDIA}" + if check_dev "null" "${LIVE_MEDIA}" "skip_uuid_check" then return 0 fi |
