diff --git a/.cvsignore b/.cvsignore index 96eeb1e..14e448b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -radvd-1.1.tar.gz +radvd-1.2.tar.gz diff --git a/radvd-1.1-stale_pid.patch b/radvd-1.1-stale_pid.patch deleted file mode 100644 index 296bb2e..0000000 --- a/radvd-1.1-stale_pid.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -up radvd-1.1/radvd.c.stale_pid radvd-1.1/radvd.c ---- radvd-1.1/radvd.c.stale_pid 2008-01-24 11:03:17.000000000 +0100 -+++ radvd-1.1/radvd.c 2008-04-04 15:10:52.000000000 +0200 -@@ -70,6 +70,7 @@ main(int argc, char *argv[]) - { - unsigned char msg[MSG_SIZE]; - char pidstr[16]; -+ int ret; - int c, log_method; - char *logfile, *pidfile; - sigset_t oset, nset; -@@ -230,10 +231,29 @@ main(int argc, char *argv[]) - exit(1); - } - -- /* FIXME: not atomic if pidfile is on an NFS mounted volume */ -- if ((fd = open(pidfile, O_CREAT|O_EXCL|O_WRONLY, 0644)) < 0) -+ if ((fd = open(pidfile, O_RDONLY, 0)) > 0) - { -- flog(LOG_ERR, "radvd pid file already exists or cannot be created, terminating: %s", strerror(errno)); -+ ret = read(fd, pidstr, sizeof(pidstr) - 1); -+ if (ret < 0) -+ { -+ flog(LOG_ERR, "cannot read radvd pid file, terminating: %s", strerror(errno)); -+ exit(1); -+ } -+ pidstr[ret] = '\0'; -+ if (!kill(atol(pidstr), 0)) -+ { -+ flog(LOG_ERR, "radvd already running, terminating."); -+ exit(1); -+ } -+ close(fd); -+ fd = open(pidfile, O_CREAT|O_TRUNC|O_WRONLY, 0644); -+ } -+ else /* FIXME: not atomic if pidfile is on an NFS mounted volume */ -+ fd = open(pidfile, O_CREAT|O_EXCL|O_WRONLY, 0644); -+ -+ if (fd < 0) -+ { -+ flog(LOG_ERR, "cannot create radvd pid file, terminating: %s", strerror(errno)); - exit(1); - } - diff --git a/radvd-1.2-posix.patch b/radvd-1.2-posix.patch new file mode 100644 index 0000000..f7237e0 --- /dev/null +++ b/radvd-1.2-posix.patch @@ -0,0 +1,35 @@ +diff -up radvd-1.2/redhat/radvd.init.posix radvd-1.2/redhat/radvd.init +--- radvd-1.2/redhat/radvd.init.posix 2009-04-27 21:56:39.000000000 +0200 ++++ radvd-1.2/redhat/radvd.init 2009-04-27 21:59:22.000000000 +0200 +@@ -28,12 +28,6 @@ + + [ -f /etc/sysconfig/radvd ] && . /etc/sysconfig/radvd + +-if [ "$1" == "status" ]; then +- [ -f /usr/sbin/radvd ] || exit 4 +-else +- [ -f /usr/sbin/radvd ] || exit 1 +-fi +- + RETVAL=0 + PROG="radvd" + LOCKFILE=/var/lock/subsys/radvd +@@ -41,10 +35,14 @@ LOCKFILE=/var/lock/subsys/radvd + # See how we were called. + case "$1" in + start) +- +- # Check that networking is up. +- [ "${NETWORKING_IPV6}" = "yes" ] || exit 1 +- ++ if [ ! -f /etc/radvd.conf ]; then ++ echo "Configuration file /etc/radvd.conf missing" 1>&2 ++ exit 6 ++ fi ++ if [ ! -x /usr/sbin/radvd ]; then ++ echo "Insufficient privilege" 1>&2 ++ exit 4 ++ fi + echo -n $"Starting $PROG: " + daemon radvd $OPTIONS + RETVAL=$? diff --git a/radvd.init b/radvd.init index c34307c..e8c0d03 100644 --- a/radvd.init +++ b/radvd.init @@ -43,7 +43,6 @@ case "$1" in echo "Insufficient privilege" 1>&2 exit 4 fi - echo -n $"Starting $prog: " echo -n $"Starting $PROG: " daemon radvd $OPTIONS RETVAL=$? diff --git a/radvd.spec b/radvd.spec index 7975e8e..29626e3 100644 --- a/radvd.spec +++ b/radvd.spec @@ -4,8 +4,8 @@ %define RADVD_UID 75 Summary: A Router Advertisement daemon Name: radvd -Version: 1.1 -Release: 8%{?dist} +Version: 1.2 +Release: 1%{?dist} # The code includes the advertising clause, so it's GPL-incompatible License: BSD with advertising Group: System Environment/Daemons @@ -18,8 +18,7 @@ Requires(pre): /usr/sbin/useradd BuildRequires: flex, byacc BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Patch0: radvd-1.1-posix.patch -Patch1: radvd-1.1-stale_pid.patch +Patch0: radvd-1.2-posix.patch %description radvd is the router advertisement daemon for IPv6. It listens to router @@ -35,7 +34,6 @@ services. %prep %setup -q %patch0 -p1 -b .posix -%patch1 -p1 -b .stale_pid %build export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIE" @@ -97,6 +95,9 @@ fi %{_sbindir}/radvdump %changelog +* Mon Apr 28 2009 Jiri Skala - 1.2-1 +- updated to latest upstream version + * Fri Feb 27 2009 Jiri Skala - 1.1-8 - regenerated posix patch diff --git a/sources b/sources index 16583fe..ca58619 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9ee449e4b89171432cb9e9100e0b5648 radvd-1.1.tar.gz +614876420d76cd2bb5bcb49760c8b9e3 radvd-1.2.tar.gz