diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-07-28 01:21:05 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-07-28 01:21:05 +0000 |
commit | 8e0da15057a7ea214b6d2a451d4efe0ff5c35e64 (patch) | |
tree | 2016e35dd6f9996b0c792c1f0290afc336f6cfc6 /src/shutdown | |
parent | b62c6527821b36195b52e875ca7af5afdc73cacf (diff) | |
download | s6-linux-init-8e0da15057a7ea214b6d2a451d4efe0ff5c35e64.tar.xz |
Don't forget to sync before rebooting
Diffstat (limited to 'src/shutdown')
-rw-r--r-- | src/shutdown/s6-linux-init-hpr.c | 1 |
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()") ; } |