From c766a0f10f44b90cfe7bee8fb2f7b7f040c98936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20M=C3=BCller?= Date: Fri, 7 Feb 2020 10:26:36 +0100 Subject: [PATCH] [machineid] create dbus var-lib folder when not existing See also #1314 --- src/modules/machineid/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/machineid/main.py b/src/modules/machineid/main.py index cde47cfd9..61f8c891e 100644 --- a/src/modules/machineid/main.py +++ b/src/modules/machineid/main.py @@ -4,7 +4,7 @@ # === This file is part of Calamares - === # # Copyright 2014, Kevin Kofler -# Copyright 2016, Philip Müller +# Copyright 2016,2020 Philip Müller # Copyright 2017, Alf Gaida # Copyright 2019, Adriaan de Groot # @@ -54,6 +54,10 @@ def run(): enable_symlink = libcalamares.job.configuration["symlink"] target_systemd_machineid_file = root_mount_point + "/etc/machine-id" target_dbus_machineid_file = root_mount_point + "/var/lib/dbus/machine-id" + target_dbus_folder = root_mount_point + "/var/lib/dbus" + + if not os.path.exists(target_dbus_folder): + os.mkdir(target_dbus_folder, 0644) if os.path.exists(target_dbus_machineid_file): os.remove(target_dbus_machineid_file)