kernel-install/90-loaderentry: do not override an existing systemd.machine_id

If the systemd.machine_id command line option is already set, do not override
it.
This commit is contained in:
Antonio Alvarez Feijoo
2022-11-07 19:54:16 +01:00
committed by Luca Boccassi
parent 5c1a5ac172
commit 802d9219aa
+1 -1
View File
@@ -85,7 +85,7 @@ BOOT_OPTIONS="${BOOT_OPTIONS% }"
# command line with the machine ID we use, so that the machine ID remains
# stable, even during factory reset, in the initrd (where the system's machine
# ID is not directly accessible yet), and if the root file system is volatile.
if [ "$ENTRY_TOKEN" = "$MACHINE_ID" ] && ! echo "$BOOT_OPTIONS" | grep -q "systemd.machine_id=$MACHINE_ID"; then
if [ "$ENTRY_TOKEN" = "$MACHINE_ID" ] && ! echo "$BOOT_OPTIONS" | grep -q "systemd.machine_id="; then
BOOT_OPTIONS="$BOOT_OPTIONS systemd.machine_id=$MACHINE_ID"
fi