1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Implements undo command and optional timeout for configuration

Several new configure command variants:

configure undo - undo last reconfiguration
configure timeout - configure with scheduled undo if not confirmed in timeout
configure confirm - confirm last configuration
configure check - just parse and validate config file
This commit is contained in:
Ondrej Zajicek
2012-12-26 12:40:48 +01:00
parent 80a9cadc76
commit a92cf57dd6
16 changed files with 407 additions and 115 deletions

View File

@@ -14,6 +14,9 @@
#include "lib/string.h"
#include "lib/resource.h"
extern int shutting_down;
extern int configuring;
void
cmd_show_status(void)
{
@@ -27,9 +30,10 @@ cmd_show_status(void)
cli_msg(-1011, "Last reboot on %s", tim);
tm_format_datetime(tim, &config->tf_base, config->load_time);
cli_msg(-1011, "Last reconfiguration on %s", tim);
if (shutting_down)
cli_msg(13, "Shutdown in progress");
else if (old_config)
else if (configuring)
cli_msg(13, "Reconfiguration in progress");
else
cli_msg(13, "Daemon is up and running");