SHA256
1
0
forked from pool/systemd
systemd/systemctl-no-assert-on-reboot-without-dbus.patch
Stephan Kulow 0b12bae943 Accepting request 160211 from Base:System
Please checkin also to openSUSE 12.3

- udev: re-add persistent network rules (bnc#809843).
  add: 1026-re-add-persistent-net.patch
- rebase all patches, ensure that they apply properly.

OBS-URL: https://build.opensuse.org/request/show/160211
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=134
2013-03-22 11:08:23 +00:00

26 lines
826 B
Diff

From d255133d8edc84662d2370a77414505a800d1922 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
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) {