]> git.proxmox.com Git - mirror_frr.git/commitdiff
Small fix (free integrate_sav) and addition of an ssh command.
authorpaul <paul>
Sat, 25 Jan 2003 06:56:09 +0000 (06:56 +0000)
committerpaul <paul>
Sat, 25 Jan 2003 06:56:09 +0000 (06:56 +0000)
vtysh/vtysh.c

index 3492e741c18d26d487f2a2beb10850c9d62290ce..5e21504cab04aaf7e464a12ed17c8cc156b18a00 100644 (file)
@@ -1271,6 +1271,7 @@ int write_config_integrated(void)
   /* Move current configuration file to backup config file */
   unlink (integrate_sav);
   rename (integrate_default, integrate_sav);
+  free   (integrate_sav);
  
   fp = fopen (integrate_default, "w");
   if (fp == NULL)
@@ -1440,6 +1441,16 @@ DEFUN (vtysh_telnet_port,
   return CMD_SUCCESS;
 }
 
+DEFUN (vtysh_ssh,
+       vtysh_ssh_cmd,
+       "ssh WORD",
+       "Open an ssh connection\n"
+       "[user@]host\n")
+{
+  execute_command ("ssh", 1, argv[0], NULL);
+  return CMD_SUCCESS;
+}
+
 DEFUN (vtysh_start_shell,
        vtysh_start_shell_cmd,
        "start-shell",
@@ -1843,6 +1854,7 @@ vtysh_init_vty ()
   install_element (VIEW_NODE, &vtysh_traceroute_cmd);
   install_element (VIEW_NODE, &vtysh_telnet_cmd);
   install_element (VIEW_NODE, &vtysh_telnet_port_cmd);
+  install_element (VIEW_NODE, &vtysh_ssh_cmd);
   install_element (ENABLE_NODE, &vtysh_ping_cmd);
   install_element (ENABLE_NODE, &vtysh_traceroute_cmd);
   install_element (ENABLE_NODE, &vtysh_telnet_cmd);