summaryrefslogtreecommitdiff
path: root/callouts
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-06-30 11:55:24 +0200
committerThomas Haller <thaller@redhat.com>2015-07-01 17:15:26 +0200
commit03491caf8351228860fc29d916f9e5c280de27f7 (patch)
tree6b62cefab01301ae224602334a581499c7ec48af /callouts
parenta961ffc6a8a7ebb717e65461c546962ee2a40324 (diff)
downloadNetworkManager-03491caf8351228860fc29d916f9e5c280de27f7.tar.gz
dispatcher: don't exit with failure in case D-Bus service stops
The initsystem should stop nm-dispatcher before stopping D-Bus service. However, on some systems that is not implemented, so nm-dispatcher should not exit with a failure message when the system bus disappears. Instead just assume that D-Bus service was stopped during shutdown and exit gracefully. Based-on-patch-by: Jacob <jacobgodserv@gmail.com> https://bugzilla.gnome.org/show_bug.cgi?id=751017 (cherry picked from commit 8fdf19863290a82e4000c1549cbc114210f545f1)
Diffstat (limited to 'callouts')
-rw-r--r--callouts/nm-dispatcher.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/callouts/nm-dispatcher.c b/callouts/nm-dispatcher.c
index 77f2153d62..09eb0d3a36 100644
--- a/callouts/nm-dispatcher.c
+++ b/callouts/nm-dispatcher.c
@@ -549,8 +549,13 @@ on_name_lost (GDBusConnection *connection,
gpointer user_data)
{
if (!connection) {
- g_warning ("Could not get the system bus. Make sure the message bus daemon is running!");
- exit (1);
+ if (!ever_acquired_name) {
+ g_warning ("Could not get the system bus. Make sure the message bus daemon is running!");
+ exit (1);
+ } else {
+ g_message ("System bus stopped. Exiting");
+ exit (0);
+ }
} else if (!ever_acquired_name) {
g_warning ("Could not acquire the " NM_DISPATCHER_DBUS_SERVICE " service.");
exit (1);