]> git.puffer.fish Git - mirror/frr.git/commitdiff
2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
authorajs <ajs>
Fri, 3 Dec 2004 16:36:46 +0000 (16:36 +0000)
committerajs <ajs>
Fri, 3 Dec 2004 16:36:46 +0000 (16:36 +0000)
* bgp_main.c: (sigint) Use zlog_notice for termination message.
  (main) Use zlog_notice for startup announcement.
* isis_main.c: (sigint,sigterm) Use zlog_notice for termination message.
  (terminate) This function should be static, not global.
  (main) Use zlog_notice for startup announcement, and remove
  ifdef ZEBRA_VERSION.
* version.h.in: Remove declaration for pid_output_lock, this function
  is now static, not global.
* pid_output.c: (pid_output_lock) This function should be static, not
  global.  And remove "old umask" error message, since it was really
  an unimportant debug message, not an error.
  (pid_output) Need to declare static function pid_output_lock.
* ospf6_main.c: (sigint,sigterm) Use zlog_notice for termination
  message.
  (main) Remove commented-out call to pid_output_lock (which should
  never be called other than from inside pid_output).  And use
  zlog_notice to print the startup message, which now includes
  the vty port.
* ospf_main.c: (sigint) Use zlog_notice for termination message.
  (main) Issue a startup announcement using zlog_notice.
* rip_main.c: (sigint) Use zlog_notice for termination message.
  (main) Add a startup announcement using zlog_notice.
* ripng_main.c: (sighup) Remove spurious terminating message.
  (sigint) Use zlog_notice for termination message.
  (main) Issue a startup announcement using zlog_notice.
* main.c: (sigint) Use zlog_notice for termination message.
  (main) Add a startup announcement using zlog_notice.

17 files changed:
bgpd/ChangeLog
bgpd/bgp_main.c
isisd/ChangeLog
isisd/isis_main.c
lib/ChangeLog
lib/pid_output.c
lib/version.h.in
ospf6d/ChangeLog
ospf6d/ospf6_main.c
ospfd/ChangeLog
ospfd/ospf_main.c
ripd/ChangeLog
ripd/rip_main.c
ripngd/ChangeLog
ripngd/ripng_main.c
zebra/ChangeLog
zebra/main.c

index 64b229cf2d7dbde3a00b57a70e8edf33a9e0cb22..c76627b6697856794338e061a250ed67fae93219 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * bgp_main.c: (sigint) Use zlog_notice for termination message.
+         (main) Use zlog_notice for startup announcement.
+
 2004-11-25 Hasso Tepper <hasso at quagga.net>
 
        * bgp_main.c: Make group to run as configurable.
index 1d6710fdbb894b985f36c9b48e078d642c7d3da0..ee498b0c31b24e8c8f02b4288b1e12fb88f22979 100644 (file)
@@ -173,7 +173,7 @@ sighup (void)
 void
 sigint (void)
 {
-  zlog (NULL, LOG_INFO, "Terminating on signal");
+  zlog_notice ("Terminating on signal");
 
   if (! retain_mode)
     bgp_terminate ();
@@ -305,8 +305,8 @@ main (int argc, char **argv)
   vty_serv_sock (vty_addr, vty_port, BGP_VTYSH_PATH);
 
   /* Print banner. */
-  zlog_info ("BGPd %s starting: vty@%d, bgp@%d", QUAGGA_VERSION,
-            vty_port, bm->port);
+  zlog_notice ("BGPd %s starting: vty@%d, bgp@%d", QUAGGA_VERSION,
+              vty_port, bm->port);
 
   /* Start finite state machine, here we go! */
   while (thread_fetch (master, &thread))
index 9ba86f17688c4c3ea4a5e1436dac61f2f1c89b1c..e241d54d6aab734ee94081e91a309d8550b52b75 100644 (file)
@@ -1,3 +1,10 @@
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * isis_main.c: (sigint,sigterm) Use zlog_notice for termination message.
+         (terminate) This function should be static, not global.
+         (main) Use zlog_notice for startup announcement, and remove
+         ifdef ZEBRA_VERSION.
+
 2004-11-25 Hasso Tepper <hasso at quagga.net>
 
        * isis_main.c: Make group to run as configurable.
index 1bf93f210c3a86f6670e84e40c4528a954536207..9aa487a7973cacc12b8283ecfe9db61f8aea38c2 100644 (file)
@@ -143,7 +143,7 @@ reload ()
   execve (_progpath, _argv, _envp);
 }
 
-void
+static void
 terminate (int i)
 {
   exit (i);
@@ -165,16 +165,14 @@ sighup (void)
 void
 sigint (void)
 {
-  zlog_info ("SIGINT received");
+  zlog_notice ("Terminating on signal SIGINT");
   terminate (0);
-
-  return;
 }
 
 void
 sigterm (void)
 {
-  zlog_info ("SIGTERM received");
+  zlog_notice ("Terminating on signal SIGTERM");
   terminate (0);
 }
 
@@ -326,11 +324,7 @@ main (int argc, char **argv, char **envp)
   vty_serv_sock (vty_addr, vty_port, ISIS_VTYSH_PATH);
 
   /* Print banner. */
-#if defined(ZEBRA_VERSION)
-  zlog_info ("ISISd %s starting: vty@%d", ZEBRA_VERSION, vty_port);
-#elif defined(QUAGGA_VERSION)
-  zlog_info ("Quagga-ISISd %s starting: vty@%d", QUAGGA_VERSION, vty_port);
-#endif
+  zlog_notice ("Quagga-ISISd %s starting: vty@%d", QUAGGA_VERSION, vty_port);
 #ifdef HAVE_IPV6
   zlog_info ("IPv6 enabled");
 #endif
index 8dde0eb5986062b008364461beb8e7cdabbc0ccc..84a578ddbc1dce28bcb3284db9eb9cfd9df28d10 100644 (file)
@@ -1,3 +1,12 @@
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * version.h.in: Remove declaration for pid_output_lock, this function
+         is now static, not global.
+       * pid_output.c: (pid_output_lock) This function should be static, not
+         global.  And remove "old umask" error message, since it was really
+         an unimportant debug message, not an error.
+         (pid_output) Need to declare static function pid_output_lock.
+
 2004-11-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * log.h: Remove several unused fields from struct zlog.  Add comments
index ae3393c17dee9fdd682b494f97bde3f648c53575..11e1243d9ac535fc30778b4e58e8d35a6f348188 100644 (file)
@@ -47,12 +47,14 @@ pid_output (const char *path)
   umask(oldumask);
   return pid;
 #else
+  static pid_t pid_output_lock (const char *);
+
   return pid_output_lock(path);
 #endif /* HAVE_FCNTL */
 }
 
 #ifdef HAVE_FCNTL
-pid_t
+static pid_t
 pid_output_lock (const char *path)
 {
   int tmp;
@@ -65,7 +67,6 @@ pid_output_lock (const char *path)
   pid = getpid ();
 
   oldumask = umask(0777 & ~LOGFILE_MASK);
-  zlog_err( "old umask %d %d", oldumask, 0777 & ~LOGFILE_MASK);
   fd = open (path, O_RDWR | O_CREAT, LOGFILE_MASK);
       if (fd < 0)
         {
index 9a707d4abc7f0e1ea6e0e0dccf1830dfc275bfb0..cc7c6ca6a694ae3c48831a8b59e9c9f14194b23b 100644 (file)
@@ -35,7 +35,6 @@
 #define QUAGGA_COPYRIGHT "Copyright 1996-2004 Kunihiro Ishiguro, et al."
 
 pid_t pid_output (const char *);
-pid_t pid_output_lock (const char *);
 
 #ifndef HAVE_DAEMON
 int daemon(int, int);
index b5b529442f78ce83e0569e3ebc974e635b2f2182..7bb6b4bf3ea60589396a5070f28ac4f7fd8f5ed3 100644 (file)
@@ -1,3 +1,12 @@
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * ospf6_main.c: (sigint,sigterm) Use zlog_notice for termination
+         message.
+         (main) Remove commented-out call to pid_output_lock (which should
+         never be called other than from inside pid_output).  And use
+         zlog_notice to print the startup message, which now includes
+         the vty port.
+
 2004-11-26 Hasso Tepper <hasso at quagga.net>
 
        * ospf6_snmp.c: Fix compile: listnode -> struct listnode *.
index 4563ece88c581c548026e9e4a7bd9e514358c09e..ba266d95120ac3f17b6beba8f263384cff2e78e4 100644 (file)
@@ -133,7 +133,7 @@ sighup (void)
 void
 sigint (void)
 {
-  zlog_info ("SIGINT received");
+  zlog_notice ("Terminating on signal SIGINT");
   exit (0);
 }
 
@@ -141,7 +141,7 @@ sigint (void)
 void
 sigterm (void)
 {
-  zlog_info ("SIGTERM received");
+  zlog_notice ("Terminating on signal SIGTERM");
   exit (0);
 }
 
@@ -281,19 +281,16 @@ main (int argc, char *argv[], char *envp[])
     daemon (0, 0);
 
   /* pid file create */
-#if 0
-  pid_output_lock (pid_file);
-#else
   pid_output (pid_file);
-#endif
 
   /* Make ospf6 vty socket. */
-  vty_serv_sock (vty_addr,
-                 vty_port ? vty_port : OSPF6_VTY_PORT, OSPF6_VTYSH_PATH);
+  if (!vty_port)
+    vty_port = OSPF6_VTY_PORT;
+  vty_serv_sock (vty_addr, vty_port, OSPF6_VTYSH_PATH);
 
   /* Print start message */
-  zlog_notice ("OSPF6d (Quagga-%s ospf6d-%s) starts",
-               QUAGGA_VERSION, OSPF6_DAEMON_VERSION);
+  zlog_notice ("OSPF6d (Quagga-%s ospf6d-%s) starts: vty@%d",
+               QUAGGA_VERSION, OSPF6_DAEMON_VERSION,vty_port);
 
   /* Start finite state machine, here we go! */
   while (thread_fetch (master, &thread))
index 92651f2fc90c951726691d18c32c4208da08c955..ff54a50764946e5bbfd73550a448257c76231187 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * ospf_main.c: (sigint) Use zlog_notice for termination message.
+         (main) Issue a startup announcement using zlog_notice.
+
 2004-11-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * ospf_packet.c: (ospf_db_desc_proc) Fix spelling of packet in warning
index 09ff197a26e4d20c963a067ec172548a2f05bbb9..d155c98094d1b94e1e32b125331462cf9f6e288d 100644 (file)
@@ -141,7 +141,7 @@ sighup (void)
 void
 sigint (void)
 {
-  zlog (NULL, LOG_INFO, "Terminating on signal");
+  zlog_notice ("Terminating on signal");
 
   ospf_terminate ();
 
@@ -317,10 +317,8 @@ main (int argc, char **argv)
   /* Create VTY socket */
   vty_serv_sock (vty_addr, vty_port, OSPF_VTYSH_PATH);
 
-#ifdef DEBUG
   /* Print banner. */
-  zlog (NULL, LOG_INFO, "OSPFd (%s) starts", QUAGGA_VERSION);
-#endif
+  zlog_notice ("OSPFd %s starting: vty@%d", QUAGGA_VERSION, vty_port);
 
   /* Fetch next active thread. */
   while (thread_fetch (master, &thread))
index 3ca7d1815916e801bd160ccd0f55caf3fefd9e88..1c703dfa564b06102f6706dec00f83364ce91f3d 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * rip_main.c: (sigint) Use zlog_notice for termination message.
+         (main) Add a startup announcement using zlog_notice.
+
 2004-11-25 Hasso Tepper <hasso at quagga.net>
 
        * rip_main.c: Make group to run as configurable.
index d545a8ecaec591f0064d2f31a1e5e3709df4df69..2b2939dd50c59726e6ce98ea0ce936ffc1381708 100644 (file)
@@ -144,7 +144,7 @@ sighup (void)
 void
 sigint (void)
 {
-  zlog (NULL, LOG_INFO, "Terminating on signal");
+  zlog_notice ("Terminating on signal");
 
   if (! retain_mode)
     rip_clean ();
@@ -290,6 +290,9 @@ main (int argc, char **argv)
   /* Create VTY's socket */
   vty_serv_sock (vty_addr, vty_port, RIP_VTYSH_PATH);
 
+  /* Print banner. */
+  zlog_notice ("RIPd %s starting: vty@%d", QUAGGA_VERSION, vty_port);
+
   /* Execute each thread. */
   while (thread_fetch (master, &thread))
     thread_call (&thread);
index 1abea5643af99d72b9b8ec6d3a4db2a46ebf0353..840f41305bbb9ce8194aa479845360483a154402 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * ripng_main.c: (sighup) Remove spurious terminating message.
+         (sigint) Use zlog_notice for termination message.
+         (main) Issue a startup announcement using zlog_notice.
+
 2004-11-25 Hasso Tepper <hasso at quagga.net>
 
        * ripng_main.c: Make group to run as configurable.
index df609a56a636206352d1ceb61809fe3f79e64cff..ac63abbb1b0df1906467663e6b4045a2343cc6d1 100644 (file)
@@ -133,7 +133,6 @@ sighup (void)
   zlog_info ("SIGHUP received");
   ripng_clean ();
   ripng_reset ();
-  zlog_info ("Terminating on signal");
 
   /* Reload config file. */
   vty_read_config (config_file, config_default);
@@ -147,7 +146,7 @@ sighup (void)
 void
 sigint (void)
 {
-  zlog_info ("Terminating on signal");
+  zlog_notice ("Terminating on signal");
 
   if (! retain_mode)
     ripng_clean ();
@@ -292,6 +291,9 @@ main (int argc, char **argv)
   /* Process id file create. */
   pid_output (pid_file);
 
+  /* Print banner. */
+  zlog_notice ("RIPNGd %s starting: vty@%d", QUAGGA_VERSION, vty_port);
+
   /* Fetch next active thread. */
   while (thread_fetch (master, &thread))
     thread_call (&thread);
index 719323171ee60742bdb610e3d4c2fed9ceb555fb..c38b47de2c5142664b85cc4e6e17ca6e025b8724 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * main.c: (sigint) Use zlog_notice for termination message.
+         (main) Add a startup announcement using zlog_notice.
+
 2004-11-25 Hasso Tepper <hasso at quagga.net>
 
        * irdp_interface.c: Remove comment from DEFUN, it breaks vtysh because
index 42e6bd148b0f586dc190fcbe4fc6133267a05a60..96420da6759867ce8e03a62eb260cff93871cba0 100644 (file)
@@ -165,7 +165,7 @@ sigint (void)
   /* Decrared in rib.c */
   void rib_close ();
 
-  zlog_info ("Terminating on signal");
+  zlog_notice ("Terminating on signal");
 
   if (!retain_mode)
     rib_close ();
@@ -372,6 +372,9 @@ main (int argc, char **argv)
   /* Make vty server socket. */
   vty_serv_sock (vty_addr, vty_port, ZEBRA_VTYSH_PATH);
 
+  /* Print banner. */
+  zlog_notice ("Zebra %s starting: vty@%d", QUAGGA_VERSION, vty_port);
+
   while (thread_fetch (zebrad.master, &thread))
     thread_call (&thread);