Package: radvd
Version: 1:1.0-2
Severity: important
Tags: patch

/etc/init.d/radvd start fails with "another radvd seems to be
already running, terminating" when /var/run is mounted on a tmpfs (via
RAMRUN=yes in /etc/default/rcS) and /var/run/radvd does not exist
after reboot. Following patch fixes that.


--- /etc/init.d/radvd.old       2007-06-07 21:21:52.000000000 +0500
+++ /etc/init.d/radvd   2008-04-01 22:52:16.000000000 +0500
@@ -14,7 +14,8 @@
 NAME=radvd
 DESC=radvd
 CONFIG=/etc/radvd.conf
-PIDFILE=/var/run/radvd/radvd.pid
+PIDDIR=/var/run/radvd
+PIDFILE=$PIDDIR/radvd.pid
 OPTIONS="-u radvd -p $PIDFILE"
 
 test -x $DAEMON || exit 0
@@ -45,6 +46,9 @@
         # We must enable IPv6 forwarding for radvd to work
        echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
 
+       # Anything under /var/run can go away on reboot
+       [ -e $PIDDIR ] || install -d -o radvd -g root -m 4755 $PIDDIR
+
        # Check for stale pidfile; radvd won't start if one is lying around
        if [ -f $PIDFILE ] && ! ps `cat  $PIDFILE` > /dev/null; then
          rm -f $PIDFILE



P.S. Permissions are taken from postinst, but they seem strange to me;
I never heard about SUID bit on directories doing anything.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages radvd depends on:
ii  adduser                       3.106      add and remove users and groups
ii  libc6                         2.7-6      GNU C Library: Shared libraries

radvd recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to