config: add handler for SIGHUP and a reload-configuration stub

This commit is contained in:
Thomas Haller
2014-07-09 18:36:20 +02:00
parent 50fce5a860
commit d62022e28a
4 changed files with 18 additions and 3 deletions

View File

@@ -40,9 +40,7 @@
static gboolean
sighup_handler (gpointer user_data)
{
/* Reread config stuff like system config files, VPN service files, etc */
nm_log_info (LOGD_CORE, "caught SIGHUP, not supported yet.");
nm_main_config_reload ();
return G_SOURCE_CONTINUE;
}

View File

@@ -37,4 +37,9 @@ gboolean nm_main_utils_early_setup (const char *progname,
gpointer option_context_hook_data,
const char *summary);
/* The following functions are not implemented inside nm-main-utils.c, instead
* main.c and nm-iface-helper.c */
void nm_main_config_reload (void);
#endif /* __MAIN_UTILS_H__ */

View File

@@ -175,6 +175,12 @@ _init_nm_debug (const char *debug)
}
}
void
nm_main_config_reload ()
{
nm_log_info (LOGD_CORE, "reloading configuration not supported.");
}
static void
manager_configure_quit (NMManager *manager, gpointer user_data)
{

View File

@@ -481,6 +481,12 @@ main (int argc, char *argv[])
/*******************************************************/
/* Stub functions */
void
nm_main_config_reload ()
{
nm_log_info (LOGD_CORE, "reloading configuration not supported");
}
gconstpointer nm_config_get (void);
const char *nm_config_get_dhcp_client (gpointer unused);
gboolean nm_config_get_configure_and_quit (gpointer unused);