diff options
Diffstat (limited to 'share/hooks')
-rwxr-xr-x | share/hooks/0180-remove-systemd-machine-id.hook.chroot | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/share/hooks/0180-remove-systemd-machine-id.hook.chroot b/share/hooks/0180-remove-systemd-machine-id.hook.chroot index 52ba38fd4..ed5d6bf6a 100755 --- a/share/hooks/0180-remove-systemd-machine-id.hook.chroot +++ b/share/hooks/0180-remove-systemd-machine-id.hook.chroot @@ -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 ] +then + rm -f /etc/machine-id + : > /etc/machine-id +fi |