Adjust /etc/machine-id logic for buster.
Commit 26a7de63b0
in master:
/etc/machine-id needs to exist and be empty on buster, while bullseye
needs this file not to exist at all. For now, treat both bullseye and
bookworm the same way.
This commit is contained in:
parent
5f7a28d8ec
commit
592c0df22e
|
@ -113,6 +113,12 @@ else:
|
|||
# deb http://deb.debian.org/debian %s main contrib non-free
|
||||
""" % backports_suite
|
||||
|
||||
# Buster requires an existing, empty /etc/machine-id file:
|
||||
if suite == 'buster':
|
||||
touch_machine_id = 'touch /etc/machine-id'
|
||||
else:
|
||||
touch_machine_id = ''
|
||||
|
||||
|
||||
### Write results:
|
||||
|
||||
|
@ -147,7 +153,8 @@ with open('raspi_master.yaml', 'r') as in_file:
|
|||
.replace('__RASPI_FIRMWARE__', raspi_firmware) \
|
||||
.replace('__WIRELESS_FIRMWARE__', wireless_firmware) \
|
||||
.replace('__SERIAL_CONSOLE__', serial) \
|
||||
.replace('__HOST__', hostname)
|
||||
.replace('__HOST__', hostname) \
|
||||
.replace('__TOUCH_MACHINE_ID__', touch_machine_id)
|
||||
|
||||
out_text = align_replace(out_text, '__FIX_FIRMWARE_PKG_NAME__', fix_firmware_cmds)
|
||||
out_text = align_replace(out_text, '__EXTRA_ROOT_SHELL_CMDS__', extra_root_shell_cmds)
|
||||
|
|
|
@ -163,3 +163,4 @@ steps:
|
|||
- chroot: /
|
||||
shell: |
|
||||
rm -f /etc/machine-id /var/lib/dbus/machine-id
|
||||
__TOUCH_MACHINE_ID__
|
||||
|
|
Loading…
Reference in New Issue