Commit eeb46805 authored by Simon McVittie's avatar Simon McVittie Committed by Daniel Baumann
Browse files

Truncate /etc/machine-id instead of deleting it.

If /etc/machine-id exists but is empty, systemd will do tricks
with bind-mounts to ensure that a valid transient UUID is bind-mounted
over it, which is exactly what we want for a live system.

If /etc/machine-id does not exist, systemd-journald
will just fail, which is undesirable.
parent 0c3f19cf
......@@ -2,8 +2,12 @@
set -e
# Remove systemd machine id.
# This removes systemd machine id that cache that makes each system unique.
# Blank out systemd machine id. If it does not exist, systemd-journald
# will fail, but if it exists and is empty, systemd will automatically
# set up a new unique ID.
rm -f /etc/machine-id
if [ -e /etc/machine-id ]
rm -f /etc/machine-id
: > /etc/machine-id
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment