summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-10-09 00:29:15 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:31:05 +0100
commite10059ad3f5f97ae43d46eb5ef6386e3f561f14f (patch)
treef6e9f2cf46a4568491f54067cdee4d48195ade7b
parent72a19f689e43318589a7c2614848778a59629b76 (diff)
downloadlive-boot-e10059ad3f5f97ae43d46eb5ef6386e3f561f14f.tar.gz
live-boot-e10059ad3f5f97ae43d46eb5ef6386e3f561f14f.zip
Adjusting to live-initramfs.
-rwxr-xr-xhooks/live13
-rw-r--r--manpages/live-initramfs.en.7.txt5
-rwxr-xr-xscripts/live44
3 files changed, 38 insertions, 24 deletions
diff --git a/hooks/live b/hooks/live
index e692690..8cfc360 100755
--- a/hooks/live
+++ b/hooks/live
@@ -57,6 +57,13 @@ then
cp /etc/console/boottime.kmap.gz "${DESTDIR}"/etc
fi
+# Configuration: Unique ID
+if [ -n "${LIVE_GENERATE_UUID}" ]
+then
+ mkdir -p "${DESTDIR}"/conf
+ uuidgen -r > "${DESTDIR}"/conf/uuid.conf
+fi
+
# Filesystem: cifs
if [ -x /sbin/mount.cifs ]
then
@@ -120,9 +127,3 @@ if [ -x /usr/bin/wget ]
then
copy_exec /usr/bin/wget /bin
fi
-
-if [ "$CASPER_GENERATE_UUID" ]; then
- # Unique ID
- mkdir -p $DESTDIR/conf
- uuidgen -r > $DESTDIR/conf/uuid.conf
-fi
diff --git a/manpages/live-initramfs.en.7.txt b/manpages/live-initramfs.en.7.txt
index 238c810..5bc0adf 100644
--- a/manpages/live-initramfs.en.7.txt
+++ b/manpages/live-initramfs.en.7.txt
@@ -62,8 +62,9 @@ Those parameters lets you override values read from the config file.
ignore_uuid
-Do not check that any UUID embedded in the initramfs matches the discovered medium.
-casper may be told to generate a UUID by setting CASPER_GENERATE_UUID=1 when building the initramfs.
+Do not check that any UUID embedded in the initramfs matches the discovered
+medium. live-initramfs may be told to generate a UUID by setting
+LIVE_GENERATE_UUID=1 when building the initramfs.
integrity-check::
diff --git a/scripts/live b/scripts/live
index 16a54c2..f204a1e 100755
--- a/scripts/live
+++ b/scripts/live
@@ -80,7 +80,9 @@ Arguments ()
;;
ignore_uuid)
- IGNORE_UUID="Yes" ;;
+ IGNORE_UUID="Yes"
+ export IGNORE_UUID
+ ;;
ip=*)
STATICIP="${ARGUMENT#ip=}"
@@ -437,20 +439,29 @@ 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
+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 ()
@@ -1023,7 +1034,8 @@ check_dev ()
if is_live_path ${mountpoint}
if is_live_path $mountpoint && \
- ([ "$skip_uuid_check" ] || matches_uuid $mountpoint); then
+ ([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
+ then
echo ${mountpoint}
return 0
else