[services] proper DM check

This commit is contained in:
Philip 2016-10-15 09:41:10 +02:00
parent 9d18fb1ece
commit 87006eaa20

View File

@ -71,8 +71,9 @@ def run():
libcalamares.utils.debug("Cannot disable systemd service {}".format(dbl['name']))
libcalamares.utils.debug("systemctl disable call in chroot returned error code {}".format(ec))
if libcalamares.globalstorage.contains("displayManagers") and not exists(join(rootmnt, "etc/systemd/system/display-manager.service")):
if libcalamares.globalstorage.contains("displayManagers"):
for dm in libcalamares.globalstorage.value("displayManagers"):
if not exists(join(rootmnt, "etc/systemd/system/display-manager.service")):
ec = libcalamares.utils.target_env_call(['systemctl', 'enable', '{}.service'.format(dm)])
if ec != 0: