summaryrefslogtreecommitdiff
path: root/src/etc/commit/post-hooks.d/00vyos-sync
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/commit/post-hooks.d/00vyos-sync')
-rwxr-xr-xsrc/etc/commit/post-hooks.d/00vyos-sync7
1 files changed, 7 insertions, 0 deletions
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..8ec732df0
--- /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://vyos.dev/T4975
+sync
+