Skip to content
Snippets Groups Projects
Commit f13a2c72 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Add Linux sysprep for removing /etc/machine-id

This file is created during runtime at early boot and is used to
identify the host in the network.

This resolves #54
parent 86564137
Branches master
Tags 0.10.2
No related merge requests found
......@@ -333,6 +333,16 @@ class Linux(Unix):
self.image.g.aug_save()
self.image.g.aug_close()
@sysprep('Removing local machine ID configuration file',
display="Remove local machine ID configuration file")
def _remove_local_machine_id_configuration_file(self):
"""Remove the /etc/machine-id file if present. This file is used by
systemd to uniquelly identify systems and will be created automatically
on the next boot if not present."""
if self.image.g.is_file('/etc/machine-id'):
self.image.g.rm('/etc/machine-id')
def _persistent_grub1(self, new_root):
"""Replaces non-persistent device name occurrences with persistent
ones in GRUB1 configuration files.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment