From 887c44a4f3d8219dc5b1c52b5dcde1f31d52b73d Mon Sep 17 00:00:00 2001 From: ajs Date: Fri, 3 Dec 2004 16:36:46 +0000 Subject: 2004-12-03 Andrew J. Schorr * 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. --- bgpd/ChangeLog | 5 +++++ bgpd/bgp_main.c | 6 +++--- isisd/ChangeLog | 7 +++++++ isisd/isis_main.c | 14 ++++---------- lib/ChangeLog | 9 +++++++++ lib/pid_output.c | 5 +++-- lib/version.h.in | 1 - ospf6d/ChangeLog | 9 +++++++++ ospf6d/ospf6_main.c | 17 +++++++---------- ospfd/ChangeLog | 5 +++++ ospfd/ospf_main.c | 6 ++---- ripd/ChangeLog | 5 +++++ ripd/rip_main.c | 5 ++++- ripngd/ChangeLog | 6 ++++++ ripngd/ripng_main.c | 6 ++++-- zebra/ChangeLog | 5 +++++ zebra/main.c | 5 ++++- 17 files changed, 82 insertions(+), 34 deletions(-) diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog index 64b229cf2..c76627b66 100644 --- a/bgpd/ChangeLog +++ b/bgpd/ChangeLog @@ -1,3 +1,8 @@ +2004-12-03 Andrew J. Schorr + + * bgp_main.c: (sigint) Use zlog_notice for termination message. + (main) Use zlog_notice for startup announcement. + 2004-11-25 Hasso Tepper * bgp_main.c: Make group to run as configurable. diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 1d6710fdb..ee498b0c3 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -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)) diff --git a/isisd/ChangeLog b/isisd/ChangeLog index 9ba86f176..e241d54d6 100644 --- a/isisd/ChangeLog +++ b/isisd/ChangeLog @@ -1,3 +1,10 @@ +2004-12-03 Andrew J. Schorr + + * 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 * isis_main.c: Make group to run as configurable. diff --git a/isisd/isis_main.c b/isisd/isis_main.c index 1bf93f210..9aa487a79 100644 --- a/isisd/isis_main.c +++ b/isisd/isis_main.c @@ -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 diff --git a/lib/ChangeLog b/lib/ChangeLog index 8dde0eb59..84a578ddb 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,12 @@ +2004-12-03 Andrew J. Schorr + + * 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 * log.h: Remove several unused fields from struct zlog. Add comments diff --git a/lib/pid_output.c b/lib/pid_output.c index ae3393c17..11e1243d9 100644 --- a/lib/pid_output.c +++ b/lib/pid_output.c @@ -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) { diff --git a/lib/version.h.in b/lib/version.h.in index 9a707d4ab..cc7c6ca6a 100644 --- a/lib/version.h.in +++ b/lib/version.h.in @@ -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); diff --git a/ospf6d/ChangeLog b/ospf6d/ChangeLog index b5b529442..7bb6b4bf3 100644 --- a/ospf6d/ChangeLog +++ b/ospf6d/ChangeLog @@ -1,3 +1,12 @@ +2004-12-03 Andrew J. Schorr + + * 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 * ospf6_snmp.c: Fix compile: listnode -> struct listnode *. diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index 4563ece88..ba266d951 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c @@ -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)) diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index 92651f2fc..ff54a5076 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,8 @@ +2004-12-03 Andrew J. Schorr + + * ospf_main.c: (sigint) Use zlog_notice for termination message. + (main) Issue a startup announcement using zlog_notice. + 2004-11-30 Andrew J. Schorr * ospf_packet.c: (ospf_db_desc_proc) Fix spelling of packet in warning diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index 09ff197a2..d155c9809 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -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)) diff --git a/ripd/ChangeLog b/ripd/ChangeLog index 3ca7d1815..1c703dfa5 100644 --- a/ripd/ChangeLog +++ b/ripd/ChangeLog @@ -1,3 +1,8 @@ +2004-12-03 Andrew J. Schorr + + * rip_main.c: (sigint) Use zlog_notice for termination message. + (main) Add a startup announcement using zlog_notice. + 2004-11-25 Hasso Tepper * rip_main.c: Make group to run as configurable. diff --git a/ripd/rip_main.c b/ripd/rip_main.c index d545a8eca..2b2939dd5 100644 --- a/ripd/rip_main.c +++ b/ripd/rip_main.c @@ -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); diff --git a/ripngd/ChangeLog b/ripngd/ChangeLog index 1abea5643..840f41305 100644 --- a/ripngd/ChangeLog +++ b/ripngd/ChangeLog @@ -1,3 +1,9 @@ +2004-12-03 Andrew J. Schorr + + * 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 * ripng_main.c: Make group to run as configurable. diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c index df609a56a..ac63abbb1 100644 --- a/ripngd/ripng_main.c +++ b/ripngd/ripng_main.c @@ -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); diff --git a/zebra/ChangeLog b/zebra/ChangeLog index 719323171..c38b47de2 100644 --- a/zebra/ChangeLog +++ b/zebra/ChangeLog @@ -1,3 +1,8 @@ +2004-12-03 Andrew J. Schorr + + * main.c: (sigint) Use zlog_notice for termination message. + (main) Add a startup announcement using zlog_notice. + 2004-11-25 Hasso Tepper * irdp_interface.c: Remove comment from DEFUN, it breaks vtysh because diff --git a/zebra/main.c b/zebra/main.c index 42e6bd148..96420da67 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -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); -- cgit v1.2.3