2017-07-30 18:27:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
|
|
|
|
2019-09-20 03:10:55 +00:00
|
|
|
if [ -e /var/lib/dbus/machine-id ]; then
|
|
|
|
> /var/lib/dbus/machine-id
|
|
|
|
fi
|
2022-04-11 05:03:35 +00:00
|
|
|
|
|
|
|
# According to documented First Boot Semantics writing "uninitialized" will trigger the full
|
|
|
|
# first boot behaviour.
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/machine-id.html#First%20Boot%20Semantics
|
|
|
|
# On older versions of systemd before first boot semantics were formalised, any non-uuid value
|
|
|
|
# will trigger a new machine-id to be generated, so "uninitialized" also works.
|
|
|
|
# Previously this was done here by truncating /etc/machine-id.
|
|
|
|
if [ -e /etc/machine-id ]; then
|
|
|
|
echo uninitialized > /etc/machine-id
|
|
|
|
fi
|
|
|
|
|