From d255133d8edc84662d2370a77414505a800d1922 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 12 Jan 2013 00:00:22 +0100 Subject: [PATCH] systemctl: don't hit an assert if we try to reboot and dbus is dead https://bugzilla.redhat.com/show_bug.cgi?id=889624 --- src/systemctl/systemctl.c | 3 +++ 1 file changed, 3 insertions(+) Index: systemd-195/src/systemctl/systemctl.c =================================================================== --- systemd-195.orig/src/systemctl/systemctl.c +++ systemd-195/src/systemctl/systemctl.c @@ -1744,6 +1744,9 @@ static int reboot_with_logind(DBusConnec const char *method; dbus_bool_t interactive = true; + if (!bus) + return -EIO; + polkit_agent_open_if_enabled(); switch (a) {