summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-07-28 01:21:05 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-07-28 01:21:05 +0000
commit8e0da15057a7ea214b6d2a451d4efe0ff5c35e64 (patch)
tree2016e35dd6f9996b0c792c1f0290afc336f6cfc6
parentb62c6527821b36195b52e875ca7af5afdc73cacf (diff)
downloads6-linux-init-8e0da15057a7ea214b6d2a451d4efe0ff5c35e64.tar.xz
Don't forget to sync before rebooting
-rw-r--r--src/shutdown/s6-linux-init-hpr.c1
1 files changed, 1 insertions, 0 deletions
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()") ;
}