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
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
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::
;;
ignore_uuid)
- IGNORE_UUID="Yes" ;;
+ IGNORE_UUID="Yes"
+ export IGNORE_UUID
+ ;;
ip=*)
STATICIP="${ARGUMENT#ip=}"
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 ()
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