]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Also nuke the dbus machine id 62/head
authorFelipe Sateler <fsateler@gmail.com>
Sun, 26 Feb 2017 16:10:36 +0000 (13:10 -0300)
committerFelipe Sateler <fsateler@gmail.com>
Sun, 26 Feb 2017 16:10:36 +0000 (13:10 -0300)
Otherwise the machine-id will not really be a new one

mkosi

diff --git a/mkosi b/mkosi
index df875c88a12ce0bb0f075c4e3e065458d5530e95..d6a4e5c8b75b4a36ef0afdfd5e3904f4d94cfbf4 100755 (executable)
--- a/mkosi
+++ b/mkosi
@@ -937,6 +937,10 @@ def reset_machine_id(args, workspace, run_build_script):
         machine_id = os.path.join(workspace, 'root', 'etc/machine-id')
         os.unlink(machine_id)
         open(machine_id, "w+b").close()
+        dbus_machine_id = os.path.join(workspace, 'root', 'var/lib/dbus/machine-id')
+        if os.path.exists(dbus_machine_id):
+            os.unlink(dbus_machine_id)
+            os.symlink('../../../etc/machine-id', dbus_machine_id)
 
 def set_root_password(args, workspace, run_build_script):
     "Set the root account password, or just delete it so it's easy to log in"