diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-11-06 15:20:29 +0100 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2014-11-23 13:23:14 -0500 |
commit | 30b6c4f110b716f35bcb7053b52d10a193b7d02f (patch) | |
tree | c261958589a613c7b24177063fc2d90953353c63 | |
parent | manager: Ensure user's systemd runtime directory exists. (diff) | |
download | systemd-30b6c4f110b716f35bcb7053b52d10a193b7d02f.tar.gz systemd-30b6c4f110b716f35bcb7053b52d10a193b7d02f.tar.bz2 systemd-30b6c4f110b716f35bcb7053b52d10a193b7d02f.zip |
systemctl: when invokes as "reboot -f", sync()
We do this in the clean shutdown path in shutdown.c, hence we should do
is for "reboot -f", too.
-rw-r--r-- | src/systemctl/systemctl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 28eaa6a84..d6ca60692 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -6917,8 +6917,13 @@ done: static int halt_now(enum action a) { -/* Make sure C-A-D is handled by the kernel from this - * point on... */ + /* The kernel will automaticall flush ATA disks and suchlike + * on reboot(), but the file systems need to be synce'd + * explicitly in advance. */ + sync(); + + /* Make sure C-A-D is handled by the kernel from this point + * on... */ reboot(RB_ENABLE_CAD); switch (a) { |