Simplify /etc/machine-id management.

Buster was the only one needing an empty /etc/machine-id file.
This commit is contained in:
Cyril Brulebois 2023-06-13 21:28:29 +02:00
parent 6075c5a212
commit 45ef172142
2 changed files with 1 additions and 5 deletions

View File

@ -104,9 +104,6 @@ else:
# deb http://deb.debian.org/debian %s main %s
""" % (backports_suite, firmware_component)
# Buster requires an existing, empty /etc/machine-id file:
touch_machine_id = 'echo "uninitialized" > /etc/machine-id'
# Buster shipped timesyncd directly into systemd:
systemd_timesyncd = 'systemd-timesyncd'
@ -149,7 +146,6 @@ with open('raspi_master.yaml', 'r') as in_file:
.replace('__BLUETOOTH_FIRMWARE__', bluetooth_firmware) \
.replace('__SERIAL_CONSOLE__', serial) \
.replace('__HOST__', hostname) \
.replace('__TOUCH_MACHINE_ID__', touch_machine_id) \
.replace('__GITCOMMIT__', gitcommit) \
.replace('__BUILDTIME__', buildtime)

View File

@ -167,7 +167,7 @@ steps:
- chroot: tag-root
shell: |
rm -f /etc/machine-id /var/lib/dbus/machine-id
__TOUCH_MACHINE_ID__
echo "uninitialized" > /etc/machine-id
# Create /etc/raspi-image-id to know, from what commit the image was built
- chroot: tag-root