summaryrefslogtreecommitdiffstats
path: root/system-build/share/hooks/normal/0180-remove-systemd-machine-id.hook.chroot
diff options
context:
space:
mode:
Diffstat (limited to 'system-build/share/hooks/normal/0180-remove-systemd-machine-id.hook.chroot')
-rwxr-xr-xsystem-build/share/hooks/normal/0180-remove-systemd-machine-id.hook.chroot13
1 files changed, 13 insertions, 0 deletions
diff --git a/system-build/share/hooks/normal/0180-remove-systemd-machine-id.hook.chroot b/system-build/share/hooks/normal/0180-remove-systemd-machine-id.hook.chroot
new file mode 100755
index 0000000..ed5d6bf
--- /dev/null
+++ b/system-build/share/hooks/normal/0180-remove-systemd-machine-id.hook.chroot
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# 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.
+
+if [ -e /etc/machine-id ]
+then
+ rm -f /etc/machine-id
+ : > /etc/machine-id
+fi