2004-04-05 Paul Jakma <paul@dishone.st>

	* lib/vty.c: Improve logging of failures to open vty socket(s).
	  See bugid #163.
	* zebra/zserv.c: print more helpful errors when we fail to successfully
	  bind and listen on zserv socket. Closes bugzilla #163.
diff --git a/lib/vty.c b/lib/vty.c
index eca1523..44439a9 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2297,13 +2297,16 @@
 
       if (confp == NULL)
         {
+          fprintf (stderr, "%s: failed to open configuration file %s: %s\n",
+                   __func__, fullpath, safe_strerror (errno));
+          
           confp = vty_use_backup_config (fullpath);
           if (confp)
             fprintf (stderr, "WARNING: using backup configuration file!\n");
           else
             {
               fprintf (stderr, "can't open configuration file [%s]\n", 
-  	            config_file);
+  	               config_file);
               exit(1);
             }
         }
@@ -2339,6 +2342,9 @@
       confp = fopen (config_default_dir, "r");
       if (confp == NULL)
         {
+          fprintf (stderr, "%s: failed to open configuration file %s: %s\n",
+                   __func__, config_default_dir, safe_strerror (errno));
+          
           confp = vty_use_backup_config (config_default_dir);
           if (confp)
             {
@@ -2350,7 +2356,7 @@
               fprintf (stderr, "can't open configuration file [%s]\n",
   		                 config_default_dir);
   	          exit (1);
-  	        }
+            }
         }      
       else
         fullpath = config_default_dir;