diff options
author | Sergei Rozhkov <gh@zserg.ru> | 2022-11-28 12:14:25 +0100 |
---|---|---|
committer | Sergei Rozhkov <gh@zserg.ru> | 2022-11-30 05:43:55 +0100 |
commit | 012f7ae4e9b5b9af9b2796867d49aceec7749d64 (patch) | |
tree | 902dfc7925db0eae6681b375ac6dba28444ce4b7 /vtysh | |
parent | Merge pull request #12369 from mruprich/frr-run-as-non-root (diff) | |
download | frr-012f7ae4e9b5b9af9b2796867d49aceec7749d64.tar.xz frr-012f7ae4e9b5b9af9b2796867d49aceec7749d64.zip |
vtysh: add motd command
Add "show motd" commad.
The vtysh user can call the "show motd" command to re-show the welcome message.
This is necessary if the user saves frequently used commands in motd.
Signed-off-by: Sergei Rozhkov <gh@zserg.ru>
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/vtysh.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 30f117505..dea09fa15 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -3939,6 +3939,12 @@ DEFUN (vtysh_ping, return CMD_SUCCESS; } +DEFUN(vtysh_motd, vtysh_motd_cmd, "show motd", SHOW_STR "Show motd\n") +{ + vty_hello(vty); + return CMD_SUCCESS; +} + ALIAS(vtysh_ping, vtysh_ping_ip_cmd, "ping ip WORD", "Send echo messages\n" "IP echo\n" @@ -4907,6 +4913,7 @@ void vtysh_init_vty(void) install_element(VIEW_NODE, &no_vtysh_terminal_monitor_cmd); install_element(VIEW_NODE, &vtysh_ping_cmd); + install_element(VIEW_NODE, &vtysh_motd_cmd); install_element(VIEW_NODE, &vtysh_ping_ip_cmd); install_element(VIEW_NODE, &vtysh_traceroute_cmd); install_element(VIEW_NODE, &vtysh_traceroute_ip_cmd); |