summaryrefslogtreecommitdiffstats
path: root/sysdep
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/config.Y9
-rw-r--r--sysdep/unix/main.c8
-rw-r--r--sysdep/unix/unix.h2
3 files changed, 12 insertions, 7 deletions
diff --git a/sysdep/unix/config.Y b/sysdep/unix/config.Y
index 5176be6..1917fe6 100644
--- a/sysdep/unix/config.Y
+++ b/sysdep/unix/config.Y
@@ -13,7 +13,7 @@ CF_HDR
CF_DECLS
-CF_KEYWORDS(LOG, SYSLOG, ALL, DEBUG, TRACE, INFO, REMOTE, WARNING, ERROR, AUTH, FATAL, BUG, STDERR)
+CF_KEYWORDS(LOG, SYSLOG, ALL, DEBUG, TRACE, INFO, REMOTE, WARNING, ERROR, AUTH, FATAL, BUG, STDERR, SOFT)
%type <i> log_mask log_mask_list log_cat
%type <g> log_file
@@ -65,8 +65,13 @@ log_cat:
/* Unix specific commands */
+CF_CLI_HELP(CONFIGURE, [soft] [\"<file>\"], [[Reload configuration]])
+
CF_CLI(CONFIGURE, cfg_name, [\"<file>\"], [[Reload configuration]])
-{ cmd_reconfig($2); } ;
+{ cmd_reconfig($2, RECONFIG_HARD); } ;
+
+CF_CLI(CONFIGURE SOFT, cfg_name, [\"<file>\"], [[Reload configuration and ignore changes in filters]])
+{ cmd_reconfig($3, RECONFIG_SOFT); } ;
CF_CLI(DOWN,,, [[Shut the daemon down]])
{ cli_msg(7, "Shutdown requested"); order_shutdown(); } ;
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index 4df4e9f..5f5b165 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -115,7 +115,7 @@ read_config(void)
else
die("Unable to open configuration file %s: %m", config_name);
}
- config_commit(conf);
+ config_commit(conf, RECONFIG_HARD);
}
void
@@ -133,11 +133,11 @@ async_config(void)
config_free(conf);
}
else
- config_commit(conf);
+ config_commit(conf, RECONFIG_HARD);
}
void
-cmd_reconfig(char *name)
+cmd_reconfig(char *name, int type)
{
struct config *conf;
@@ -154,7 +154,7 @@ cmd_reconfig(char *name)
}
else
{
- switch (config_commit(conf))
+ switch (config_commit(conf, type))
{
case CONF_DONE:
cli_msg(3, "Reconfigured.");
diff --git a/sysdep/unix/unix.h b/sysdep/unix/unix.h
index 997a408..83f61af 100644
--- a/sysdep/unix/unix.h
+++ b/sysdep/unix/unix.h
@@ -16,7 +16,7 @@ struct pool;
void async_config(void);
void async_dump(void);
void async_shutdown(void);
-void cmd_reconfig(char *name);
+void cmd_reconfig(char *name, int type);
/* io.c */