[arch-commits] Commit in metalog/trunk (PKGBUILD metalog)

Juergen Hoetzel juergen at archlinux.org
Fri Apr 13 07:41:19 EDT 2012


    Date: Friday, April 13, 2012 @ 07:41:19
  Author: juergen
Revision: 156090

fix FS#29291 - [metalog] writing pid in init-script is broken

Modified:
  metalog/trunk/PKGBUILD
  metalog/trunk/metalog

----------+
 PKGBUILD |    2 +-
 metalog  |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-04-13 11:14:35 UTC (rev 156089)
+++ PKGBUILD	2012-04-13 11:41:19 UTC (rev 156090)
@@ -4,7 +4,7 @@
 
 pkgname=metalog
 pkgver=2.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Metalog is a modern replacement for syslogd and klogd"
 url="http://metalog.sourceforge.net"
 license=('GPL')

Modified: metalog
===================================================================
--- metalog	2012-04-13 11:14:35 UTC (rev 156089)
+++ metalog	2012-04-13 11:41:19 UTC (rev 156090)
@@ -6,7 +6,10 @@
 . /etc/rc.conf
 . /etc/rc.d/functions
 
-PID=`pidof -o %PPID /usr/sbin/metalog`
+if [ -f /var/run/metalog.pid ]; then
+    PID=$(cat /var/run/metalog.pid) 2>/dev/null
+fi
+
 case "$1" in
   start)
     stat_busy "Starting Metalog"
@@ -14,7 +17,6 @@
     if [ $? -gt 0 ]; then
       stat_fail
     else
-      echo $PID > /var/run/metalog.pid
       add_daemon metalog
       stat_done
     fi



More information about the arch-commits mailing list