mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
systemd_applier: Run only in case it is enabled
This commit is contained in:
parent
00c1aaeb55
commit
7f8d495b1b
@ -37,10 +37,7 @@ class systemd_applier(applier_frontend):
|
||||
self.units = []
|
||||
self.__module_enabled = check_module_enabled(self.storage, self.__module_name, self.__module_enabled)
|
||||
|
||||
def apply(self):
|
||||
'''
|
||||
Trigger control facility invocation.
|
||||
'''
|
||||
def run(self):
|
||||
for setting in self.systemd_unit_settings:
|
||||
valuename = setting.hive_key.rpartition('\\')[2]
|
||||
try:
|
||||
@ -54,6 +51,13 @@ class systemd_applier(applier_frontend):
|
||||
except:
|
||||
logging.error(slogm('Failed applying unit {}'.format(unit.unit_name)))
|
||||
|
||||
def apply(self):
|
||||
'''
|
||||
Trigger control facility invocation.
|
||||
'''
|
||||
if self.__module_enabled:
|
||||
self.run()
|
||||
|
||||
class systemd_applier_user(applier_frontend):
|
||||
__module_name = 'systemd_applier_user'
|
||||
__module_experimental = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user