* src/login/logind.c (manager_connect_bus):
- Notice instead of error if we can't subscribe to updates from
systemd. Perhaps we should remove this entirely. But leaving
it optional means, that a system managed by systemd can use
elogind substituting systemd-login.
- Warn instead of error if we can't add receiver matches from
systemd events. On a system not run by systemd, such events
wouldn't occur anyway.
"path='/org/freedesktop/systemd1'",
match_job_removed, m);
if (r < 0)
"path='/org/freedesktop/systemd1'",
match_job_removed, m);
if (r < 0)
- return log_error_errno(r, "Failed to add match for JobRemoved: %m");
+ log_warning_errno(r, "Failed to add match for JobRemoved: %m");
r = sd_bus_add_match(m->bus,
NULL,
r = sd_bus_add_match(m->bus,
NULL,
"path='/org/freedesktop/systemd1'",
match_unit_removed, m);
if (r < 0)
"path='/org/freedesktop/systemd1'",
match_unit_removed, m);
if (r < 0)
- return log_error_errno(r, "Failed to add match for UnitRemoved: %m");
+ log_warning_errno(r, "Failed to add match for UnitRemoved: %m");
r = sd_bus_add_match(m->bus,
NULL,
r = sd_bus_add_match(m->bus,
NULL,
"member='PropertiesChanged'",
match_properties_changed, m);
if (r < 0)
"member='PropertiesChanged'",
match_properties_changed, m);
if (r < 0)
- return log_error_errno(r, "Failed to add match for PropertiesChanged: %m");
+ log_warning_errno(r, "Failed to add match for PropertiesChanged: %m");
r = sd_bus_add_match(m->bus,
NULL,
r = sd_bus_add_match(m->bus,
NULL,
"path='/org/freedesktop/systemd1'",
match_reloading, m);
if (r < 0)
"path='/org/freedesktop/systemd1'",
match_reloading, m);
if (r < 0)
- return log_error_errno(r, "Failed to add match for Reloading: %m");
-#if 0
+ log_warning_errno(r, "Failed to add match for Reloading: %m");
+
r = sd_bus_call_method(
m->bus,
"org.freedesktop.systemd1",
r = sd_bus_call_method(
m->bus,
"org.freedesktop.systemd1",
"Subscribe",
&error,
NULL, NULL);
"Subscribe",
&error,
NULL, NULL);
- if (r < 0) {
- log_error("Failed to enable subscription: %s", bus_error_message(&error, r));
- return r;
- }
-#endif // 0
+ if (r < 0)
+ log_notice("Failed to enable subscription: %s", bus_error_message(&error, r));
+
r = sd_bus_request_name(m->bus, "org.freedesktop.login1", 0);
if (r < 0)
return log_error_errno(r, "Failed to register name: %m");
r = sd_bus_request_name(m->bus, "org.freedesktop.login1", 0);
if (r < 0)
return log_error_errno(r, "Failed to register name: %m");