summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dbus.c31
-rw-r--r--src/manager.c6
-rw-r--r--src/unit.c3
3 files changed, 27 insertions, 13 deletions
diff --git a/src/dbus.c b/src/dbus.c
index 1620469e0e..7f8b6a05d5 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -338,10 +338,12 @@ static DBusHandlerResult api_bus_message_filter(DBusConnection *connection, DBus
dbus_error_init(&error);
- log_debug("Got D-Bus request: %s.%s() on %s",
- dbus_message_get_interface(message),
- dbus_message_get_member(message),
- dbus_message_get_path(message));
+ if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL ||
+ dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL)
+ log_debug("Got D-Bus request: %s.%s() on %s",
+ dbus_message_get_interface(message),
+ dbus_message_get_member(message),
+ dbus_message_get_path(message));
if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
log_error("Warning! API D-Bus connection terminated.");
@@ -443,10 +445,13 @@ static DBusHandlerResult system_bus_message_filter(DBusConnection *connection, D
dbus_error_init(&error);
- log_debug("Got D-Bus request: %s.%s() on %s",
- dbus_message_get_interface(message),
- dbus_message_get_member(message),
- dbus_message_get_path(message));
+ if (m->api_bus != m->system_bus &&
+ (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL ||
+ dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL))
+ log_debug("Got D-Bus request on system bus: %s.%s() on %s",
+ dbus_message_get_interface(message),
+ dbus_message_get_member(message),
+ dbus_message_get_path(message));
if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
log_error("Warning! System D-Bus connection terminated.");
@@ -474,10 +479,12 @@ static DBusHandlerResult private_bus_message_filter(DBusConnection *connection,
assert(message);
assert(m);
- log_debug("Got D-Bus request: %s.%s() on %s",
- dbus_message_get_interface(message),
- dbus_message_get_member(message),
- dbus_message_get_path(message));
+ if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL ||
+ dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL)
+ log_debug("Got D-Bus request: %s.%s() on %s",
+ dbus_message_get_interface(message),
+ dbus_message_get_member(message),
+ dbus_message_get_path(message));
if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected"))
shutdown_connection(m, connection);
diff --git a/src/manager.c b/src/manager.c
index 638ef2f450..a643263213 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -1768,6 +1768,8 @@ static int manager_start_target(Manager *m, const char *name, JobMode mode) {
dbus_error_init(&error);
+ log_info("Activating special unit %s", name);
+
if ((r = manager_add_job_by_name(m, JOB_START, name, mode, true, &error, NULL)) < 0)
log_error("Failed to enqueue %s job: %s", name, bus_error(&error, r));
@@ -1795,6 +1797,8 @@ static int manager_process_signal_fd(Manager *m) {
return -errno;
}
+ log_debug("Received SIG%s", strna(signal_to_string(sfsi.ssi_signo)));
+
switch (sfsi.ssi_signo) {
case SIGCHLD:
@@ -1905,7 +1909,7 @@ static int manager_process_signal_fd(Manager *m) {
break;
}
- log_info("Got unhandled signal <%s>.", strsignal(sfsi.ssi_signo));
+ log_warning("Got unhandled signal <%s>.", strna(signal_to_string(sfsi.ssi_signo)));
}
}
}
diff --git a/src/unit.c b/src/unit.c
index a5f8712ae6..c287310a48 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -970,6 +970,9 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) {
else if (UNIT_IS_ACTIVE_OR_RELOADING(os) && !UNIT_IS_ACTIVE_OR_RELOADING(ns))
u->meta.active_exit_timestamp = ts;
+ if (ns != os && ns == UNIT_MAINTENANCE)
+ log_notice("Unit %s entered maintenance state.", u->meta.id);
+
timer_unit_notify(u, ns);
path_unit_notify(u, ns);