|
|
2aacef |
From d3b559f5e561750e6c50449b2ca84b40abeb492d Mon Sep 17 00:00:00 2001
|
|
|
2aacef |
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
|
|
2aacef |
Date: Fri, 4 Nov 2022 09:57:24 +0100
|
|
|
2aacef |
Subject: [PATCH] kernel-install/90-loaderentry: do not add multiple
|
|
|
2aacef |
systemd.machine_id options
|
|
|
2aacef |
|
|
|
2aacef |
Do not unconditionally add a new systemd.machine_id command line option, first
|
|
|
2aacef |
check if it already exists with the expected value.
|
|
|
2aacef |
|
|
|
2aacef |
Fixes #25203
|
|
|
2aacef |
|
|
|
2aacef |
(cherry picked from commit 981502c5cc9ce32c3f77ff74aad87cd6f0da3b16)
|
|
|
2aacef |
|
|
|
2aacef |
Related #2138081
|
|
|
2aacef |
---
|
|
|
2aacef |
src/kernel-install/90-loaderentry.install | 2 +-
|
|
|
2aacef |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
2aacef |
|
|
|
2aacef |
diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install
|
|
|
2aacef |
index 743af33aa9..ea75e1b0d8 100755
|
|
|
2aacef |
--- a/src/kernel-install/90-loaderentry.install
|
|
|
2aacef |
+++ b/src/kernel-install/90-loaderentry.install
|
|
|
2aacef |
@@ -85,7 +85,7 @@ BOOT_OPTIONS="${BOOT_OPTIONS% }"
|
|
|
2aacef |
# command line with the machine ID we use, so that the machine ID remains
|
|
|
2aacef |
# stable, even during factory reset, in the initrd (where the system's machine
|
|
|
2aacef |
# ID is not directly accessible yet), and if the root file system is volatile.
|
|
|
2aacef |
-if [ "$ENTRY_TOKEN" = "$MACHINE_ID" ]; then
|
|
|
2aacef |
+if [ "$ENTRY_TOKEN" = "$MACHINE_ID" ] && ! echo "$BOOT_OPTIONS" | grep -q "systemd.machine_id=$MACHINE_ID"; then
|
|
|
2aacef |
BOOT_OPTIONS="$BOOT_OPTIONS systemd.machine_id=$MACHINE_ID"
|
|
|
2aacef |
fi
|
|
|
2aacef |
|