diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/system-login.py | 3 | ||||
-rwxr-xr-x | src/etc/commit/post-hooks.d/00vyos-sync | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/conf_mode/system-login.py b/src/conf_mode/system-login.py index ceca0a14b..aba10689d 100755 --- a/src/conf_mode/system-login.py +++ b/src/conf_mode/system-login.py @@ -311,9 +311,6 @@ def apply(login): except Exception as e: raise ConfigError(f'RADIUS configuration failed: {e}') - # sync user data files to disk - os.sync() - return None diff --git a/src/etc/commit/post-hooks.d/00vyos-sync b/src/etc/commit/post-hooks.d/00vyos-sync new file mode 100755 index 000000000..e3bde3abb --- /dev/null +++ b/src/etc/commit/post-hooks.d/00vyos-sync @@ -0,0 +1,7 @@ +#!/bin/sh +# When power is lost right after a commit modified files, the +# system can be corrupted and e.g. login is no longer possible. +# Always sync files to the backend storage after a commit. +# https://phabricator.vyos.net/T4975 +sync + |