pid_t child;
sigset_t oldmask, sigmask;
+ const char *e_inprog = "Configuration write already in progress.";
+ const char *e_dmn = "Not all daemons are up, cannot write config.";
+
if (integrated_write_pid != -1) {
- vty_out(vty, "%% configuration write already in progress.\n");
+ vty_out(vty, "%% %s\n", e_inprog);
return CMD_WARNING;
}
+ /* check that all daemons are up before clobbering config */
+ if (!check_all_up()) {
+ vty_out(vty, "%% %s\n", e_dmn);
+ /*
+ * vtysh interprets this return value to mean that it should
+ * not try to write the config itself
+ */
+ return CMD_WARNING_CONFIG_FAILED;
+ }
+
fflush(stdout);
fflush(stderr);
exit(1);
}
+DEFUN_NOSH (show_debugging_watchfrr,
+ show_debugging_watchfrr_cmd,
+ "show debugging [watchfrr]",
+ SHOW_STR
+ DEBUG_STR
+ WATCHFRR_STR)
+{
+ return CMD_SUCCESS;
+}
+
+DEFUN (show_watchfrr,
+ show_watchfrr_cmd,
+ "show watchfrr",
+ SHOW_STR
+ WATCHFRR_STR)
+{
+ watchfrr_status(vty);
+ return CMD_SUCCESS;
+}
+
+#ifndef VTYSH_EXTRACT_PL
+#include "watchfrr/watchfrr_vty_clippy.c"
+#endif
+
+DEFPY (watchfrr_ignore_daemon,
+ watchfrr_ignore_daemon_cmd,
+ "[no] watchfrr ignore DAEMON$dname",
+ NO_STR
+ "Watchfrr Specific sub-command\n"
+ "Ignore a specified daemon when it does not respond to echo request\n"
+ "The daemon to ignore\n")
+{
+ watchfrr_set_ignore_daemon(vty, dname, no ? false : true );
+
+ return CMD_SUCCESS;
+}
+
void integrated_write_sigchld(int status)
{
uint8_t reply[4] = {0, 0, 0, CMD_WARNING};
{
integrated_write_pid = -1;
install_element(ENABLE_NODE, &config_write_integrated_cmd);
+ install_element(ENABLE_NODE, &show_debugging_watchfrr_cmd);
+
+ install_element(ENABLE_NODE, &watchfrr_ignore_daemon_cmd);
+
+ install_element(CONFIG_NODE, &show_debugging_watchfrr_cmd);
+ install_element(VIEW_NODE, &show_watchfrr_cmd);
}