diff --git a/src/modules/machineid/main.py b/src/modules/machineid/main.py index 7966ad73b..2b1149c5a 100644 --- a/src/modules/machineid/main.py +++ b/src/modules/machineid/main.py @@ -36,9 +36,8 @@ def run(): target_systemd_machineid_file = "{}/etc/machine-id".format(root_mount_point) target_dbus_machineid_file = "{}/var/lib/dbus/machine-id".format(root_mount_point) - if enable_systemd or enable_dbus: - if os.path.exists(target_dbus_machineid_file): - os.remove(target_dbus_machineid_file) + if os.path.exists(target_dbus_machineid_file): + os.remove(target_dbus_machineid_file) if enable_systemd: if os.path.exists(target_systemd_machineid_file):