diff options
| author | Diederik de Haas <didi.debian@cknow.org> | 2021-08-23 20:48:17 +0200 |
|---|---|---|
| committer | Diederik de Haas <didi.debian@cknow.org> | 2021-09-09 00:28:05 +0200 |
| commit | 26a7de63b0bb3de1b5d0c4d0529240721c322dbb (patch) | |
| tree | dabeb721d9692a0e3ac72ae2c159ed444537b657 | |
| parent | 7aed761507b2ca7d04aee1fb75b662522922a587 (diff) | |
Fix machine-id mechanism for Buster.
The logic wrt /etc/machine-id changed between Buster and Bullseye.
While on Bullseye the file should not exist, on Buster the file must
exist, but be empty, in order to generate a new machine-id on first
boot.
It seems that /var/lib/dbus/machine-id is a symlink to /etc/machine-id
on Buster, while a separate file on Bullseye, so nothing needs to be
done with that file/symlink.
Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | raspi_master.yaml | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -79,6 +79,7 @@ raspi_base_bullseye.yaml: raspi_master.yaml cat raspi_master.yaml | \ sed "s/__RELEASE__/bullseye/" |\ sed "s/__FIRMWARE_PKG__/raspi-firmware/" | \ + sed "/touch \/etc\/machine-id/d" | \ grep -v "__OTHER_APT_ENABLE__" |\ grep -v "__FIX_FIRMWARE_PKG_NAME__" |\ sed "s/__SECURITY_SUITE__/bullseye-security/" > $@ diff --git a/raspi_master.yaml b/raspi_master.yaml index d8ffae6..9a8cb3f 100644 --- a/raspi_master.yaml +++ b/raspi_master.yaml @@ -161,6 +161,9 @@ steps: # populated during installation. # # Note this will also trigger ConditionFirstBoot=yes for systemd. + # On Buster, /etc/machine-id should be an emtpy file, not an absent file + # On Bullseye, /etc/machine-id should not exist in an image - chroot: / shell: | rm -f /etc/machine-id /var/lib/dbus/machine-id + touch /etc/machine-id |
