]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install/90-loaderentry: do not override an existing systemd.machine_id
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Mon, 7 Nov 2022 14:25:25 +0000 (15:25 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 7 Nov 2022 18:54:16 +0000 (19:54 +0100)
If the systemd.machine_id command line option is already set, do not override
it.

src/kernel-install/90-loaderentry.install

index ea75e1b0d8d4f44fec25a7bd4716d9cc27364359..41a05534b93ab31838d7aa9f73d55f91dfe54fc9 100755 (executable)
@@ -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