From 3a6e77d479da4321b851163490a9b79ef2cef7b8 Mon Sep 17 00:00:00 2001 From: zsdc Date: Thu, 2 Feb 2023 12:00:07 +0200 Subject: login: T4975: Fixed broken CLI commands User profile files are not saved to disk after configuration is fully applied. Because of this, after a fast system reset, profile files can be empty, and CLI is broken. This fix adds a `sync()` call after the user's configuration, which should protect from data loss and fix the problem with profiles. --- src/conf_mode/system-login.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conf_mode/system-login.py b/src/conf_mode/system-login.py index e26b81e3d..5297ab939 100755 --- a/src/conf_mode/system-login.py +++ b/src/conf_mode/system-login.py @@ -322,6 +322,9 @@ def apply(login): except Exception as e: raise ConfigError(f'RADIUS configuration failed: {e}') + # sync user data files to disk + os.sync() + return None -- cgit v1.2.3