From ae9dde044f0a60c9034874b2912729ed694f5375 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 4 Feb 2023 13:23:00 +0100 Subject: T4975: always sync() filesystem after commit (cherry picked from commit 29a44a73c638cb22839aa32986de367231b6efe9) --- debian/vyos-1x.install | 1 + src/etc/commit/post-hooks.d/00vyos-sync | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100755 src/etc/commit/post-hooks.d/00vyos-sync diff --git a/debian/vyos-1x.install b/debian/vyos-1x.install index 96c3f2008..82f3f73fc 100644 --- a/debian/vyos-1x.install +++ b/debian/vyos-1x.install @@ -1,3 +1,4 @@ +etc/commit etc/dhcp etc/netplug etc/ppp 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 + -- cgit v1.2.3