[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#767472: Use build UUID



Source: live-boot
Severity: wishlist
Tags: patch

Please copy the build UUID from /etc/live/uuid.conf into the initrd. See
the attached patch.

This is a companion feature request for Bug #767469. Please see there
for a more detailed explanation.

Gaudenz

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (100, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From 27749fc4f30b238339d36e48b046d20228cf6837 Mon Sep 17 00:00:00 2001
From: Gaudenz Steinlin <gaudenz@debian.org>
Date: Fri, 31 Oct 2014 09:05:51 +0100
Subject: [PATCH] Use build UUID

Embed the build UUID stored in /etc/live/uuid.conf into the initramfs if
it's present. This makes it possible to couple the initrd to a
particular squashfs image.

This needs support for generating the UUID in live-build.
---
 backend/initramfs-tools/live.hook | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/backend/initramfs-tools/live.hook b/backend/initramfs-tools/live.hook
index 76f4218..06041d4 100755
--- a/backend/initramfs-tools/live.hook
+++ b/backend/initramfs-tools/live.hook
@@ -66,10 +66,10 @@ then
 fi
 
 # Configuration: Unique ID
-if [ -n "${LIVE_GENERATE_UUID}" ]
+if [ -r /etc/live/uuid.conf ]
 then
 	mkdir -p "${DESTDIR}/conf"
-	uuidgen -r > "${DESTDIR}/conf/uuid.conf"
+	cp /etc/live/uuid.conf ${DESTDIR}/conf
 fi
 
 # Filesystem: btrfs
-- 
2.1.1


Reply to: