[machineid] Use same approach as we do in Manjaro
- See also https://gitlab.manjaro.org/applications/calamares/commit/da8f45ae - Fixes #1314
This commit is contained in:
parent
c766a0f10f
commit
72d742e2f4
@ -54,10 +54,6 @@ 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)
|
||||
@ -69,7 +65,7 @@ def run():
|
||||
|
||||
if enable_dbus:
|
||||
if enable_symlink and os.path.exists(target_systemd_machineid_file):
|
||||
check_target_env_call(["ln", "-s", "/etc/machine-id",
|
||||
check_target_env_call(["ln", "-sf", "/etc/machine-id",
|
||||
"/var/lib/dbus/machine-id"])
|
||||
else:
|
||||
check_target_env_call(["dbus-uuidgen", "--ensure"])
|
||||
|
Loading…
Reference in New Issue
Block a user