From 0049f05a8bb82c3e084bacc5945596761d706c55 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 16 Nov 2012 01:30:29 +0100 Subject: shutdown: readd explicit sync() when shutting down As it turns out reboot() doesn't actually imply a file system sync, but only a disk sync. Accordingly, readd explicit sync() invocations immediately before we invoke reboot(). This is much less dramatic than it might sounds as we umount all disks/read-only remount them anyway before going down. --- src/core/service.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/service.c') diff --git a/src/core/service.c b/src/core/service.c index cf08485374..df72abab01 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2485,6 +2485,7 @@ static int service_start_limit_test(Service *s) { case SERVICE_START_LIMIT_REBOOT_IMMEDIATE: log_warning("%s start request repeated too quickly, rebooting immediately.", UNIT(s)->id); + sync(); reboot(RB_AUTOBOOT); break; -- cgit v1.2.3-54-g00ecf