1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

gpupdate-setup: Check for gpupdate-user.service correctly

This commit is contained in:
Игорь Чудов 2020-08-20 18:29:01 +04:00
parent 57607d1311
commit e4113e971f
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC

View File

@ -134,7 +134,7 @@ def get_status():
Check that gpupdate.service and gpupdate-user.service are enabled.
'''
is_gpupdate = is_unit_enabled('gpupdate.service')
is_gpupdate_user = is_unit_enabled('gpupdate-user.service')
is_gpupdate_user = is_unit_enabled('gpupdate-user.service', unit_global=True)
if is_gpupdate and is_gpupdate_user:
return True
@ -223,7 +223,7 @@ def enable_gp(policy_name, backend_type):
# Enable gpupdate-setup.service for all users
if not rollback_on_error(cmd_enable_gpupdate_user_service):
return
if not is_unit_enabled('gpupdate-user.service'):
if not is_unit_enabled('gpupdate-user.service', unit_global=True):
disable_gp()
return