diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-21 09:57:26 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-21 09:57:26 +0100 |
commit | e0a45fb42163a6bfdeeee44bd0a6a7461552e10f (patch) | |
tree | d0c889a0b98ea7d269e44c1693d5a3fbb6322738 /sysdep/unix/main.c | |
parent | e304fd4bcf5813b581a39078a25a5cf6916b9f29 (diff) | |
download | bird-e0a45fb42163a6bfdeeee44bd0a6a7461552e10f.tar bird-e0a45fb42163a6bfdeeee44bd0a6a7461552e10f.zip |
Restricted read-only CLI.
Also adds support for executing commands using birdc <cmd>.
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r-- | sysdep/unix/main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 7a1ef28..2245692 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -141,6 +141,9 @@ cmd_reconfig(char *name, int type) { struct config *conf; + if (cli_access_restricted()) + return; + if (!name) name = config_name; cli_msg(-2, "Reading configuration from %s", name); @@ -304,6 +307,16 @@ cli_init_unix(void) */ void +cmd_shutdown(void) +{ + if (cli_access_restricted()) + return; + + cli_msg(7, "Shutdown requested"); + order_shutdown(); +} + +void async_shutdown(void) { DBG("Shutting down...\n"); |