summaryrefslogtreecommitdiff
path: root/src/etc
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-02-04 13:23:00 +0100
committerChristian Breunig <christian@breunig.cc>2023-02-04 13:26:28 +0100
commitae9dde044f0a60c9034874b2912729ed694f5375 (patch)
tree27650fcb58f09d0de0736ab6e76edac4285ef943 /src/etc
parentb9ba0a67da3f10755780e13b3c15d8c2042ae70d (diff)
downloadvyos-1x-ae9dde044f0a60c9034874b2912729ed694f5375.tar.gz
vyos-1x-ae9dde044f0a60c9034874b2912729ed694f5375.zip
T4975: always sync() filesystem after commit
(cherry picked from commit 29a44a73c638cb22839aa32986de367231b6efe9)
Diffstat (limited to 'src/etc')
-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..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
+