]> git.puffer.fish Git - mirror/frr.git/commitdiff
vtysh: Modify -b option to work with -n option
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 10 Feb 2016 13:14:10 +0000 (08:14 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 10 Feb 2016 20:07:05 +0000 (15:07 -0500)
If there is no Quagga.conf file and the -b option has
been specified, the vtysh -b file is erroring out and failing.

Modify the code to use -n in conjunction of -b and to not
error out in this situation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
vtysh/vtysh_main.c

index 033b273e58614c537b22ecdc36571eb7b454680a..befc86e6e228d0d6196e92c54502af5be654b657 100644 (file)
@@ -451,7 +451,10 @@ main (int argc, char **argv, char **env)
        {
          fprintf (stderr, "Can't open configuration file [%s]\n",
                   integrate_default);
-         exit (1);
+         if (no_error)
+           exit (0);
+         else
+           exit (1);
        }
       else
        exit (0);