mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
Added cleaning the autofs configuration catalog and logs for it
This commit is contained in:
parent
829825060b
commit
5fe0b6f418
@ -124,14 +124,26 @@ class cifs_applier(applier_frontend):
|
||||
__module_name = 'CIFSApplier'
|
||||
__module_enabled = True
|
||||
__module_experimental = False
|
||||
__dir4clean = '/etc/auto.master.gpupdate.d'
|
||||
|
||||
def __init__(self, storage, sid):
|
||||
self.clear_directory_auto_dir()
|
||||
self.applier_cifs = cifs_applier_user(storage, sid, None)
|
||||
self.__module_enabled = check_enabled(
|
||||
storage
|
||||
, self.__module_name
|
||||
, self.__module_experimental
|
||||
)
|
||||
def clear_directory_auto_dir(self):
|
||||
path = Path(self.__dir4clean)
|
||||
|
||||
for item in path.iterdir():
|
||||
try:
|
||||
if item.is_file() or item.is_symlink():
|
||||
item.unlink()
|
||||
except Exception as exc:
|
||||
log('W37', {'exc': exc})
|
||||
log('D231')
|
||||
|
||||
def apply(self):
|
||||
if self.__module_enabled:
|
||||
|
@ -946,6 +946,9 @@ msgstr "Обновление пароля не требуется"
|
||||
msgid "Password successfully updated"
|
||||
msgstr "Пароль успешно обновлён"
|
||||
|
||||
msgid "Cleaning the autofs catalog"
|
||||
msgstr "Очистка каталога autofs"
|
||||
|
||||
# Debug_end
|
||||
|
||||
# Warning
|
||||
@ -1058,6 +1061,9 @@ msgstr "Не удалось завершить процесс"
|
||||
msgid "The user was not found to change the password"
|
||||
msgstr "Пользователь для изменения пароля не был найден"
|
||||
|
||||
msgid "Error while cleaning the autofs catalog"
|
||||
msgstr "Ошибка при очистке каталога autofs"
|
||||
|
||||
# Fatal
|
||||
msgid "Unable to refresh GPO list"
|
||||
msgstr "Невозможно обновить список объектов групповых политик"
|
||||
|
@ -345,6 +345,7 @@ def debug_code(code):
|
||||
debug_ids[228] = 'Process terminated'
|
||||
debug_ids[229] = 'Password update not needed'
|
||||
debug_ids[230] = 'Password successfully updated'
|
||||
debug_ids[231] = 'Cleaning the autofs catalog'
|
||||
|
||||
return debug_ids.get(code, 'Unknown debug code')
|
||||
|
||||
@ -392,6 +393,7 @@ def warning_code(code):
|
||||
warning_ids[34] = 'Failed to calculate password age'
|
||||
warning_ids[35] = 'Failed to terminate process'
|
||||
warning_ids[36] = 'The user was not found to change the password'
|
||||
warning_ids[37] = 'Error while cleaning the autofs catalog'
|
||||
|
||||
return warning_ids.get(code, 'Unknown warning code')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user