vtysh/lib: write domainname to config file

Ticket: CM-19626
Review: CCR-7170
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
This commit is contained in:
Mitesh Kanjariya 2018-02-07 14:46:04 -08:00 committed by mitesh
parent d1911c2664
commit 3b103fec6b
2 changed files with 8 additions and 0 deletions

View File

@ -500,6 +500,9 @@ static int config_write_host(struct vty *vty)
if (cmd_hostname_get())
vty_out(vty, "hostname %s\n", cmd_hostname_get());
if (cmd_domainname_get())
vty_out(vty, "domainname %s\n", cmd_domainname_get());
if (host.encrypt) {
if (host.password_encrypt)
vty_out(vty, "password 8 %s\n", host.password_encrypt);

View File

@ -448,6 +448,11 @@ void vtysh_config_write()
sprintf(line, "hostname %s", cmd_hostname_get());
vtysh_config_parse_line(NULL, line);
}
if (cmd_domainname_get()) {
sprintf(line, "domainname %s", cmd_domainname_get());
vtysh_config_parse_line(NULL, line);
}
if (vtysh_write_integrated == WRITE_INTEGRATED_NO)
vtysh_config_parse_line(NULL,
"no service integrated-vtysh-config");