diff options
author | Thomas Haller <thaller@redhat.com> | 2014-07-09 18:36:20 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-02-03 13:01:53 +0100 |
commit | d62022e28a508070e3d5ef089ab4e17dd45d3b23 (patch) | |
tree | 0f569bbfe4c76f81930c287a2de6fde8cca42a72 | |
parent | 50fce5a860479016470117ded4fb7ea947c27c1c (diff) | |
download | NetworkManager-d62022e28a508070e3d5ef089ab4e17dd45d3b23.tar.gz |
config: add handler for SIGHUP and a reload-configuration stub
-rw-r--r-- | src/main-utils.c | 4 | ||||
-rw-r--r-- | src/main-utils.h | 5 | ||||
-rw-r--r-- | src/main.c | 6 | ||||
-rw-r--r-- | src/nm-iface-helper.c | 6 |
4 files changed, 18 insertions, 3 deletions
diff --git a/src/main-utils.c b/src/main-utils.c index 909ef28ad1..164dc84a99 100644 --- a/src/main-utils.c +++ b/src/main-utils.c @@ -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; } diff --git a/src/main-utils.h b/src/main-utils.h index 432833f31d..9b29866be0 100644 --- a/src/main-utils.h +++ b/src/main-utils.h @@ -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__ */ diff --git a/src/main.c b/src/main.c index 5432e1f3e8..89cfeb1cda 100644 --- a/src/main.c +++ b/src/main.c @@ -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) { diff --git a/src/nm-iface-helper.c b/src/nm-iface-helper.c index 8b61b5252f..97678aa1e8 100644 --- a/src/nm-iface-helper.c +++ b/src/nm-iface-helper.c @@ -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); |