libnm-core: add _nm_utils_is_manager_process

Add a variable indicating whether the process is the NetworkManager
daemon.
This commit is contained in:
Dan Winship 2014-11-14 11:45:51 -05:00
parent fb773f6b2f
commit 543416e5f6
2 changed files with 5 additions and 0 deletions

View file

@ -115,4 +115,6 @@ gboolean _nm_utils_string_in_list (const char *str,
void _nm_dbus_errors_init (void);
extern gboolean _nm_utils_is_manager_process;
#endif

View file

@ -59,6 +59,7 @@
#include "nm-dispatcher.h"
#include "nm-settings.h"
#include "nm-auth-manager.h"
#include "nm-core-internal.h"
#if !defined(NM_DIST_VERSION)
# define NM_DIST_VERSION VERSION
@ -231,6 +232,8 @@ main (int argc, char *argv[])
{NULL}
};
_nm_utils_is_manager_process = TRUE;
main_loop = g_main_loop_new (NULL, FALSE);
if (!nm_main_utils_early_setup ("NetworkManager",