diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-01-12 00:00:22 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-01-14 21:24:57 +0100 |
commit | d255133d8edc84662d2370a77414505a800d1922 (patch) | |
tree | 3df7a01d4f58ef00edcfb790acd4b911f43651e5 | |
parent | 60f9ba0b94a4a86751d9a8c8b210cf07fc0962ba (diff) |
systemctl: don't hit an assert if we try to reboot and dbus is dead
https://bugzilla.redhat.com/show_bug.cgi?id=889624
-rw-r--r-- | src/systemctl/systemctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 0def1a2f55..bfa4d45fc2 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -1738,6 +1738,9 @@ static int reboot_with_logind(DBusConnection *bus, enum action a) { const char *method; dbus_bool_t interactive = true; + if (!bus) + return -EIO; + polkit_agent_open_if_enabled(); switch (a) { |