diff --git a/radvd.init b/radvd.init index d0ba2e3..fa2bd26 100644 --- a/radvd.init +++ b/radvd.init @@ -12,7 +12,7 @@ # based on these advertisements. # # processname: radvd -# pidfile: /var/run/radvd.pid +# pidfile: /var/run/radvd/radvd.pid # config: /etc/radvd.conf # config: /etc/sysconfig/radvd @@ -32,6 +32,7 @@ RETVAL=0 PROG="radvd" LOCKFILE=/var/lock/subsys/radvd +PIDFILE=${PIDFILE:-"/var/run/radvd/radvd.pid"} # See how we were called. case "$1" in @@ -73,9 +74,17 @@ case "$1" in RETVAL=$? ;; reload|force-reload) + $PROG -c + RETVAL=$? echo -n $"Reloading $PROG: " - killproc radvd -HUP - RETVAL=$? + if [ $RETVAL -eq 0 ]; then + killproc -p $PIDFILE radvd -HUP + RETVAL=$? + else + echo_failure + echo + echo -n $"not reloading due to configuration syntax error" + fi echo ;; condrestart|try-restart) diff --git a/radvd.spec b/radvd.spec index 4ad5077..a29b062 100644 --- a/radvd.spec +++ b/radvd.spec @@ -4,7 +4,7 @@ Summary: A Router Advertisement daemon Name: radvd Version: 1.7 -Release: 2%{?dist} +Release: 3%{?dist} # The code includes the advertising clause, so it's GPL-incompatible License: BSD with advertising Group: System Environment/Daemons @@ -109,7 +109,10 @@ exit 0 %{_sbindir}/radvdump %changelog -* Wed Feb 09 2011 Jiri Skala - 1.7-2 +* Mon Feb 28 2011 Jiri Skala - 1.7-2 +- fixes #679830 - radvd dies when reloading, initscript reports "OK" + +* Wed Feb 23 2011 Jiri Skala - 1.7-2 - fixes #679821 - provides native systemd service file * Wed Feb 09 2011 Jiri Skala - 1.7-1 diff --git a/radvd.sysconfig b/radvd.sysconfig index 04cc5f6..ec9e270 100644 --- a/radvd.sysconfig +++ b/radvd.sysconfig @@ -1,5 +1,9 @@ # $Id: radvd.sysconfig,v 1.1 2004/09/09 11:04:01 cvsdist Exp $ +# use PIDFILE variable if you want override pid file (-p $PIDFILE) +# $PIDFILE is used by reload command. +PIDFILE="/var/run/radvd/radvd.pid" + # No chroot; /var/run/radvd must be owned by -u. OPTIONS="-u radvd"