X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Ffsck.c;h=7855f3ac071cd0d094065deab2ce135f36bb56ff;hp=dfaf221b3e1bb598e2e0ec42d1c0325cb58a93b7;hb=3414abee0dfadd4a7d9dcca3f46025037010488e;hpb=c8bc83f5eac49f083ae53d965577118c1b5c1116 diff --git a/src/fsck.c b/src/fsck.c index dfaf221b3..7855f3ac0 100644 --- a/src/fsck.c +++ b/src/fsck.c @@ -57,7 +57,7 @@ static void start_target(const char *target, bool isolate) { else mode = "replace"; - log_debug("Running request %s/start/%s", target, mode); + log_info("Running request %s/start/%s", target, mode); if (!(m = dbus_message_new_method_call("org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "StartUnitReplace"))) { log_error("Could not allocate message."); @@ -142,7 +142,7 @@ static void test_files(void) { } int main(int argc, char *argv[]) { - const char *cmdline[7]; + const char *cmdline[8]; int i = 0, r = EXIT_FAILURE, q; pid_t pid; siginfo_t status; @@ -213,6 +213,7 @@ int main(int argc, char *argv[]) { cmdline[i++] = "/sbin/fsck"; cmdline[i++] = "-a"; cmdline[i++] = "-T"; + cmdline[i++] = "-l"; if (!root_directory) cmdline[i++] = "-M"; @@ -246,12 +247,16 @@ int main(int argc, char *argv[]) { else log_error("fsck failed due to unknown reason."); - if (status.si_code == CLD_EXITED && status.si_status & 2) + if (status.si_code == CLD_EXITED && (status.si_status & 2) && root_directory) /* System should be rebooted. */ start_target(SPECIAL_REBOOT_TARGET, false); - else + else if (status.si_code == CLD_EXITED && (status.si_status & 6)) /* Some other problem */ start_target(SPECIAL_EMERGENCY_TARGET, true); + else { + r = EXIT_SUCCESS; + log_warning("Ignoring error."); + } } else r = EXIT_SUCCESS;