diff options
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c index c9715965aa..159ed07b38 100644 --- a/lib/command.c +++ b/lib/command.c @@ -144,7 +144,9 @@ void print_version(const char *progname) { printf("%s version %s\n", progname, FRR_VERSION); printf("%s\n", FRR_COPYRIGHT); +#ifdef ENABLE_VERSION_BUILD_CONFIG printf("configured with:\n\t%s\n", FRR_CONFIG_ARGS); +#endif } char *argv_concat(struct cmd_token **argv, int argc, int shift) @@ -902,6 +904,13 @@ static int cmd_execute_command_real(vector vline, enum cmd_filter_type filter, > vty->candidate_config->version) nb_config_replace(vty->candidate_config, running_config, true); + + /* + * Perform pending commit (if any) before executing + * non-YANG command. + */ + if (matched_element->attr != CMD_ATTR_YANG) + nb_cli_pending_commit_check(vty); } ret = matched_element->func(matched_element, vty, argc, argv); @@ -1334,8 +1343,9 @@ DEFUN (show_version, vty_out(vty, "%s %s (%s).\n", FRR_FULL_NAME, FRR_VERSION, cmd_hostname_get() ? cmd_hostname_get() : ""); vty_out(vty, "%s%s\n", FRR_COPYRIGHT, GIT_INFO); +#ifdef ENABLE_VERSION_BUILD_CONFIG vty_out(vty, "configured with:\n %s\n", FRR_CONFIG_ARGS); - +#endif return CMD_SUCCESS; } |
