mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 02:50:17 +01:00
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 8fdf198632)
This commit is contained in:
parent
a961ffc6a8
commit
03491caf83
1 changed files with 7 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue