]> git.proxmox.com Git - mirror_frr.git/commitdiff
vtysh/lib: write domainname to config file
authorMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>
Wed, 7 Feb 2018 22:46:04 +0000 (14:46 -0800)
committermitesh <mitesh@cumulusnetworks.com>
Fri, 9 Feb 2018 07:04:05 +0000 (23:04 -0800)
Ticket: CM-19626
Review: CCR-7170
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
lib/command.c
vtysh/vtysh_config.c

index d17f2c3d48cb99bce0a48420cad0ecb4b9c4db43..6870f4804b40709501b84d05d771909a7c768761 100644 (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);
index 967f855fbc45fff1c96df49aea448196457a721f..5ba749e66f2648328a72e840e64967677b2fd494 100644 (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");