summaryrefslogtreecommitdiff
path: root/src/modules/services-systemd/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/services-systemd/main.py')
-rw-r--r--src/modules/services-systemd/main.py29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/modules/services-systemd/main.py b/src/modules/services-systemd/main.py
index 7488f0a18..67488ffd9 100644
--- a/src/modules/services-systemd/main.py
+++ b/src/modules/services-systemd/main.py
@@ -62,15 +62,19 @@ def systemctl(targets, command, suffix):
def run():
+ #init_key = libcalamares.globalstorage.value(GS::INITSYSTEM_KEY)
+ #desktop_key = libcalamares.globalstorage.value(GS::DESKTOP_KEY )
+ init_key = libcalamares.globalstorage.value('default-initsystem') # TODO:
+ desktop_key = libcalamares.globalstorage.value('default-desktop' ) # TODO:
+
+ if init_key != 'systemd': return None
+
+
"""
Setup systemd services
"""
- setServices()
-
- cfg = libcalamares.job.configuration
- services = cfg['services']
- targets = cfg['targets']
- disable = cfg['disable']
+ cfg = libcalamares.job.configuration
+ cfg['services'] += cfg.get('services' , []) + cfg.get(desktop_key + '-services' , [])
# note that the "systemctl enable" and "systemctl disable" commands used
# here will work in a chroot; in fact, they are the only systemctl commands
@@ -97,18 +101,5 @@ def run():
if r is not None:
return r
-
# This could have just been return r
return None
-
-
-def setServices():
- #init_key = libcalamares.globalstorage.value(GS::INITSYSTEM_KEY)
- #desktop_key = libcalamares.globalstorage.value(GS::DESKTOP_KEY )
- init_key = libcalamares.globalstorage.value('default-initsystem') # TODO:
- desktop_key = libcalamares.globalstorage.value('default-desktop' ) # TODO:
- config = libcalamares.job.configuration
- config['services'] = config[init_key + '-services'] + \
- config[desktop_key + '-services']
- config['targets' ] = config[init_key + '-targets' ]
- config['disable' ] = config[init_key + '-disable' ]