mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 06:38:11 +02:00
core: log when exiting
This commit is contained in:
parent
e383153375
commit
1ec0645602
1 changed files with 7 additions and 2 deletions
|
|
@ -328,7 +328,9 @@ main (int argc, char *argv[])
|
||||||
setup_signals ();
|
setup_signals ();
|
||||||
|
|
||||||
nm_logging_setup (become_daemon);
|
nm_logging_setup (become_daemon);
|
||||||
|
|
||||||
nm_info ("starting...");
|
nm_info ("starting...");
|
||||||
|
success = FALSE;
|
||||||
|
|
||||||
main_loop = g_main_loop_new (NULL, FALSE);
|
main_loop = g_main_loop_new (NULL, FALSE);
|
||||||
|
|
||||||
|
|
@ -378,13 +380,15 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
/* Start our DBus service */
|
/* Start our DBus service */
|
||||||
if (!nm_dbus_manager_start_service (dbus_mgr)) {
|
if (!nm_dbus_manager_start_service (dbus_mgr)) {
|
||||||
nm_warning ("Failed to start the dbus manager.");
|
nm_warning ("Failed to start the dbus service.");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Bring up the loopback interface. */
|
/* Bring up the loopback interface. */
|
||||||
nm_system_enable_loopback ();
|
nm_system_enable_loopback ();
|
||||||
|
|
||||||
|
success = TRUE;
|
||||||
|
|
||||||
/* Told to quit before getting to the mainloop by the signal handler */
|
/* Told to quit before getting to the mainloop by the signal handler */
|
||||||
if (quit_early == TRUE)
|
if (quit_early == TRUE)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
@ -419,5 +423,6 @@ done:
|
||||||
unlink (pidfile);
|
unlink (pidfile);
|
||||||
g_free (pidfile);
|
g_free (pidfile);
|
||||||
|
|
||||||
exit (0);
|
nm_info ("exiting (%s)", success ? "success" : "error");
|
||||||
|
exit (success ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue