From 8e0da15057a7ea214b6d2a451d4efe0ff5c35e64 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 28 Jul 2019 01:21:05 +0000 Subject: Don't forget to sync before rebooting --- src/shutdown/s6-linux-init-hpr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/shutdown/s6-linux-init-hpr.c') diff --git a/src/shutdown/s6-linux-init-hpr.c b/src/shutdown/s6-linux-init-hpr.c index 886f10b..6c88b47 100644 --- a/src/shutdown/s6-linux-init-hpr.c +++ b/src/shutdown/s6-linux-init-hpr.c @@ -71,6 +71,7 @@ int main (int argc, char const *const *argv) if (force) { + sync() ; reboot(what == 3 ? RB_AUTOBOOT : what == 2 ? RB_POWER_OFF : RB_HALT_SYSTEM) ; strerr_diefu1sys(111, "reboot()") ; } -- cgit v1.2.3