[quagga-dev 1540] Re: patch to redhat/quagga.logrotate to fix killall pathname

Andrew J. Schorr aschorr at telemetry-investments.com
Mon Sep 27 15:28:43 BST 2004


On Mon, May 10, 2004 at 10:29:12AM -0400, Andrew J. Schorr wrote:
> Sorry I missed this in my last patch to redhat/quagga.logrotate, but
> the killall path seems to be incorrect (it's in /usr/bin/killall on
> my system, not /usr/sbin/killall).

This problem still exists in CVS: redhat/quagga.logrotate includes
postrotate commands such as:

   /usr/sbin/killall -USR1 zebra

On my system, that is the wrong path: killall is located in /usr/bin.
So either the path should be fixed, or we should stop using killall.

Other packages seem to use a pid file.  For example, /etc/logrotate.d/syslog
contains the following:

 /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true

Any thoughts on what makes the most sense?  Certainly the current
approach doesn't work, since /usr/sbin/killall does not exist (at least not
on my Fedora Core 1 system).

I have attached a tentative (untested) patch using /bin/kill -HUP.

-Andy
-------------- next part --------------
--- ./redhat/quagga.logrotate.kill	2004-08-18 23:36:13.000000000 -0400
+++ ./redhat/quagga.logrotate	2004-09-27 10:17:34.000000000 -0400
@@ -2,7 +2,7 @@
     notifempty
     missingok
     postrotate
-	/usr/sbin/killall -USR1 zebra
+	/bin/kill -USR1 `cat /var/run/quagga/zebra.pid 2> /dev/null` 2> /dev/null || true
     endscript
 }
 
@@ -10,7 +10,7 @@
     notifempty
     missingok
     postrotate
-	/usr/sbin/killall -USR1 bgpd
+	/bin/kill -USR1 `cat /var/run/quagga/bgpd.pid 2> /dev/null` 2> /dev/null || true
     endscript
 }
 
@@ -18,7 +18,7 @@
     notifempty
     missingok
     postrotate
-	/usr/sbin/killall -USR1 ospfd
+	/bin/kill -USR1 `cat /var/run/quagga/ospfd.pid 2> /dev/null` 2> /dev/null || true
     endscript
 }
 
@@ -26,7 +26,7 @@
     notifempty
     missingok
     postrotate
-	/usr/sbin/killall -USR1 ospf6d
+	/bin/kill -USR1 `cat /var/run/quagga/ospf6d.pid 2> /dev/null` 2> /dev/null || true
     endscript
 }
 
@@ -34,7 +34,7 @@
     notifempty
     missingok
     postrotate
-	/usr/sbin/killall -USR1 ripd
+	/bin/kill -USR1 `cat /var/run/quagga/ripd.pid 2> /dev/null` 2> /dev/null || true
     endscript
 }
 
@@ -42,6 +42,6 @@
     notifempty
     missingok
     postrotate
-	/usr/sbin/killall -USR1 ripngd
+	/bin/kill -USR1 `cat /var/run/quagga/ripngd.pid 2> /dev/null` 2> /dev/null || true
     endscript
 }


More information about the Quagga-dev mailing list