2019-09-10 11:19:01 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2019-09-25 13:13:40 +02:00
|
|
|
/*
|
2014-10-29 09:36:47 -05:00
|
|
|
* Copyright (C) 2014 Red Hat, Inc.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __MAIN_UTILS_H__
|
|
|
|
|
#define __MAIN_UTILS_H__
|
|
|
|
|
|
2020-09-28 16:03:33 +02:00
|
|
|
void nm_main_utils_ensure_root(void);
|
2015-03-13 20:57:18 +01:00
|
|
|
|
2020-09-28 16:03:33 +02:00
|
|
|
void nm_main_utils_setup_signals(GMainLoop *main_loop);
|
2014-10-29 09:36:47 -05:00
|
|
|
|
2020-09-28 16:03:33 +02:00
|
|
|
void nm_main_utils_ensure_statedir(void);
|
|
|
|
|
void nm_main_utils_ensure_rundir(void);
|
2015-03-13 22:55:39 +01:00
|
|
|
|
2020-09-28 16:03:33 +02:00
|
|
|
gboolean nm_main_utils_write_pidfile(const char *pidfile);
|
2014-10-29 09:36:47 -05:00
|
|
|
|
2020-09-28 16:03:33 +02:00
|
|
|
void nm_main_utils_ensure_not_running_pidfile(const char *pidfile);
|
2014-10-29 09:36:47 -05:00
|
|
|
|
2020-09-28 16:03:33 +02:00
|
|
|
gboolean nm_main_utils_early_setup(const char * progname,
|
|
|
|
|
int * argc,
|
|
|
|
|
char ** argv[],
|
|
|
|
|
GOptionEntry *options,
|
|
|
|
|
void (*option_context_hook)(gpointer user_data,
|
|
|
|
|
GOptionContext *opt_ctx),
|
|
|
|
|
gpointer option_context_hook_data,
|
|
|
|
|
const char *summary);
|
2014-10-29 09:36:47 -05:00
|
|
|
|
2014-07-09 18:36:20 +02:00
|
|
|
/* The following functions are not implemented inside nm-main-utils.c, instead
|
|
|
|
|
* main.c and nm-iface-helper.c */
|
|
|
|
|
|
2020-09-28 16:03:33 +02:00
|
|
|
void nm_main_config_reload(int signal);
|
2014-07-09 18:36:20 +02:00
|
|
|
|
2014-10-29 09:36:47 -05:00
|
|
|
#endif /* __MAIN_UTILS_H__ */
|