diff options
Diffstat (limited to 'src/initctl.c')
-rw-r--r-- | src/initctl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/initctl.c b/src/initctl.c index 83a560a14a..74eccac557 100644 --- a/src/initctl.c +++ b/src/initctl.c @@ -350,8 +350,6 @@ int main(int argc, char *argv[]) { log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); log_parse_environment(); - log_info("systemd-initctl running as pid %lu", (unsigned long) getpid()); - if ((n = sd_listen_fds(true)) < 0) { log_error("Failed to read listening file descriptors from environment: %s", strerror(-r)); return 1; @@ -365,6 +363,8 @@ int main(int argc, char *argv[]) { if (server_init(&server, (unsigned) n) < 0) return 2; + log_debug("systemd-initctl running as pid %lu", (unsigned long) getpid()); + sd_notify(false, "READY=1\n" "STATUS=Processing requests..."); @@ -390,16 +390,17 @@ int main(int argc, char *argv[]) { if ((k = process_event(&server, &event)) < 0) goto fail; } + r = 0; + log_debug("systemd-initctl stopped as pid %lu", (unsigned long) getpid()); + fail: sd_notify(false, "STATUS=Shutting down..."); server_done(&server); - log_info("systemd-initctl stopped as pid %lu", (unsigned long) getpid()); - dbus_shutdown(); return r; |