vty_out (vty, "!%s", VTY_NEWLINE);
for (i = 0; i < array_size(vtysh_client); i++)
- vtysh_client_config (&vtysh_client[i], line);
+ if ((argc < 1 ) || (begins_with(vtysh_client[i].name, argv[0])))
+ vtysh_client_config (&vtysh_client[i], line);
/* Integrate vtysh specific configuration. */
vtysh_config_write ();
SHOW_STR
"Current operating configuration\n")
-ALIAS (vtysh_write_terminal_daemon,
+ALIAS (vtysh_write_terminal,
vtysh_show_running_config_daemon_cmd,
"show running-config (zebra|ripd|ripngd|ospfd|ospf6d|bgpd|isisd|pimd)",
SHOW_STR
if ((master = vector_slot (configvec, i)) != NULL)
{
for (ALL_LIST_ELEMENTS (master, node, nnode, config))
- {
+ {
+ /* Don't print empty sections for interface/vrf. Route maps on the
+ * other hand could have a legitimate empty section at the end.
+ */
+ if ((config->index == INTERFACE_NODE || (config->index == VRF_NODE))
+ && list_isempty (config->line))
+ continue;
+
fprintf (fp, "%s\n", config->name);
fflush (fp);