mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
Added registry saving to dconf in the backend
This commit is contained in:
parent
a6210f8b29
commit
9fc5007590
@ -22,6 +22,9 @@ from .samba_backend import samba_backend
|
||||
from .nodomain_backend import nodomain_backend
|
||||
from util.logging import log
|
||||
from util.config import GPConfig
|
||||
from util.util import get_uid_by_username, touch_file
|
||||
from util.paths import get_dconf_config_path
|
||||
from storage.dconf_registry import Dconf_registry, create_dconf_ini_file
|
||||
|
||||
def backend_factory(dc, username, is_machine, no_domain = False):
|
||||
'''
|
||||
@ -57,5 +60,16 @@ def backend_factory(dc, username, is_machine, no_domain = False):
|
||||
logdata = dict({'error': str(exc)})
|
||||
log('E8', logdata)
|
||||
|
||||
save_dconf(username, is_machine)
|
||||
|
||||
return back
|
||||
|
||||
def save_dconf(username, is_machine):
|
||||
if is_machine:
|
||||
uid = None
|
||||
else:
|
||||
uid = get_uid_by_username(username) if not is_machine else None
|
||||
target_file = get_dconf_config_path(uid)
|
||||
touch_file(target_file)
|
||||
Dconf_registry.apply_template(uid)
|
||||
create_dconf_ini_file(target_file,Dconf_registry.global_registry_dict)
|
||||
|
Loading…
x
Reference in New Issue
Block a user