mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
gpupdate-setup/rollback_on_error()
This is helper function for consistent Group Policy disabling in case of any errors while enabling Group Policies.
This commit is contained in:
parent
53b94246a8
commit
f9cef07151
@ -183,6 +183,11 @@ def get_active_policy_name():
|
||||
|
||||
return actual_policy_name
|
||||
|
||||
def rollback_on_error(command_name):
|
||||
if 0 != runcmd(command_name)[0]:
|
||||
disable_gp()
|
||||
return False
|
||||
return True
|
||||
|
||||
def disable_gp():
|
||||
cmd_set_global_policy = ['/usr/sbin/control', 'system-policy', 'global']
|
||||
|
Loading…
x
Reference in New Issue
Block a user