fixes #679830 - radvd dies when reloading, initscript reports "OK"

This commit is contained in:
Jiri Skala 2011-02-28 14:20:45 +01:00
parent 081f173a03
commit 14b49a1a87
3 changed files with 21 additions and 5 deletions

View File

@ -12,7 +12,7 @@
# based on these advertisements. # based on these advertisements.
# #
# processname: radvd # processname: radvd
# pidfile: /var/run/radvd.pid # pidfile: /var/run/radvd/radvd.pid
# config: /etc/radvd.conf # config: /etc/radvd.conf
# config: /etc/sysconfig/radvd # config: /etc/sysconfig/radvd
@ -32,6 +32,7 @@
RETVAL=0 RETVAL=0
PROG="radvd" PROG="radvd"
LOCKFILE=/var/lock/subsys/radvd LOCKFILE=/var/lock/subsys/radvd
PIDFILE=${PIDFILE:-"/var/run/radvd/radvd.pid"}
# See how we were called. # See how we were called.
case "$1" in case "$1" in
@ -73,9 +74,17 @@ case "$1" in
RETVAL=$? RETVAL=$?
;; ;;
reload|force-reload) reload|force-reload)
$PROG -c
RETVAL=$?
echo -n $"Reloading $PROG: " echo -n $"Reloading $PROG: "
killproc radvd -HUP if [ $RETVAL -eq 0 ]; then
RETVAL=$? killproc -p $PIDFILE radvd -HUP
RETVAL=$?
else
echo_failure
echo
echo -n $"not reloading due to configuration syntax error"
fi
echo echo
;; ;;
condrestart|try-restart) condrestart|try-restart)

View File

@ -4,7 +4,7 @@
Summary: A Router Advertisement daemon Summary: A Router Advertisement daemon
Name: radvd Name: radvd
Version: 1.7 Version: 1.7
Release: 2%{?dist} Release: 3%{?dist}
# The code includes the advertising clause, so it's GPL-incompatible # The code includes the advertising clause, so it's GPL-incompatible
License: BSD with advertising License: BSD with advertising
Group: System Environment/Daemons Group: System Environment/Daemons
@ -109,7 +109,10 @@ exit 0
%{_sbindir}/radvdump %{_sbindir}/radvdump
%changelog %changelog
* Wed Feb 09 2011 Jiri Skala <jskala@redhat.com> - 1.7-2 * Mon Feb 28 2011 Jiri Skala <jskala@redhat.com> - 1.7-2
- fixes #679830 - radvd dies when reloading, initscript reports "OK"
* Wed Feb 23 2011 Jiri Skala <jskala@redhat.com> - 1.7-2
- fixes #679821 - provides native systemd service file - fixes #679821 - provides native systemd service file
* Wed Feb 09 2011 Jiri Skala <jskala@redhat.com> - 1.7-1 * Wed Feb 09 2011 Jiri Skala <jskala@redhat.com> - 1.7-1

View File

@ -1,5 +1,9 @@
# $Id: radvd.sysconfig,v 1.1 2004/09/09 11:04:01 cvsdist Exp $ # $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. # No chroot; /var/run/radvd must be owned by -u.
OPTIONS="-u radvd" OPTIONS="-u radvd"