diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-02-18 10:23:45 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-02-18 10:23:45 -0500 |
| commit | 7cfc61d32ebd375f7b3c1cf259606c843c548454 (patch) | |
| tree | bb5b44b87e1d288d012ea4c88318f43e15ac746b /lib/command.c | |
| parent | 689e66945d8b272c8af4e6b8feb3b0056bda771a (diff) | |
lib, vtysh: Rehook the motd command back into vtysh
Code was already in place to read and display a motd, but
no cli was present to make it happen. Add the cli
back to vtysh.conf.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/command.c b/lib/command.c index a1809f514c..037835e1df 100644 --- a/lib/command.c +++ b/lib/command.c @@ -4004,6 +4004,16 @@ DEFUN (no_config_log_timestamp_precision, return CMD_SUCCESS; } +int +cmd_banner_motd_file (const char *file) +{ + if (host.motdfile) + XFREE (MTYPE_HOST, host.motdfile); + host.motdfile = XSTRDUP (MTYPE_HOST, file); + + return CMD_SUCCESS; +} + DEFUN (banner_motd_file, banner_motd_file_cmd, "banner motd file [FILE]", @@ -4012,11 +4022,7 @@ DEFUN (banner_motd_file, "Banner from a file\n" "Filename\n") { - if (host.motdfile) - XFREE (MTYPE_HOST, host.motdfile); - host.motdfile = XSTRDUP (MTYPE_HOST, argv[0]); - - return CMD_SUCCESS; + return cmd_banner_motd_file (argv[0]); } DEFUN (banner_motd_default, |
