From: Lennart Poettering Date: Fri, 11 Jan 2013 23:00:22 +0000 (+0100) Subject: systemctl: don't hit an assert if we try to reboot and dbus is dead X-Git-Tag: v198~558 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=d255133d8edc84662d2370a77414505a800d1922 systemctl: don't hit an assert if we try to reboot and dbus is dead https://bugzilla.redhat.com/show_bug.cgi?id=889624 --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 0def1a2f5..bfa4d45fc 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) {