]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Allow daemons to startup without an actual conf file
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 7 Mar 2016 19:57:16 +0000 (14:57 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 7 Mar 2016 19:57:16 +0000 (14:57 -0500)
If neither a Quagga.conf or <protocol>.conf exist, then
still start the daemon.  Assume that configuration is coming
shortly

Ticket: CM-9714
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:

lib/vty.c

index ae828f1f891b880bb5d77b3b706e03b7704ac75f..ae3e595364edae9b68ecd1f5ce52cfda46ac336e 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2413,7 +2413,7 @@ vty_read_config (char *config_file,
         {
           ret = stat (integrate_default, &conf_stat);
           if (ret >= 0)
-           return;
+           goto tmp_free_and_out;
         }
 #endif /* VTYSH */
       confp = fopen (config_default_dir, "r");
@@ -2431,8 +2431,8 @@ vty_read_config (char *config_file,
           else
             {
               fprintf (stderr, "can't open configuration file [%s]\n",
-                                config_default_dir);
-                 exit (1);
+                      config_default_dir);
+             goto tmp_free_and_out;
             }
         }      
       else
@@ -2444,7 +2444,8 @@ vty_read_config (char *config_file,
   fclose (confp);
 
   host_config_set (fullpath);
-  
+
+tmp_free_and_out:
   if (tmp)
     XFREE (MTYPE_TMP, fullpath);
 }