-/*-*- Mode: C; c-basic-offset: 8 -*-*/
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
DBUS_TYPE_STRING, &target,
DBUS_TYPE_STRING, &replace,
DBUS_TYPE_INVALID)) {
- log_error("Could not attach target and flag information to signal message.");
+ log_error("Could not attach target and flag information to message.");
goto finish;
}
log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
log_parse_environment();
-
- log_info("systemd-initctl running as pid %lu", (unsigned long) getpid());
+ log_open();
if ((n = sd_listen_fds(true)) < 0) {
log_error("Failed to read listening file descriptors from environment: %s", strerror(-r));
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...");
if (k <= 0)
break;
- if ((k = process_event(&server, &event)) < 0)
+ if (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;