On 2/9/06, Shaun Jackman <[EMAIL PROTECTED]> wrote:
...
> This patch binds rpld to the interface specified in /etc/default/rpld
> by passing the -i option to rpld.
...
-- "$INTERFACE" must be added to the restart|force-reload case as well
as the start case. This updated patch also includes the fix for the
first part of the bug in #352063 -- /etc/init.d/rpld stop does not
stop the daemon due to --pid-file.
Cheers,
Shaun
diff -ur rpld-1.8beta1-/debian/init-default rpld-1.8beta1/debian/init-default
--- rpld-1.8beta1-/debian/init-default 2006-02-09 07:44:12.000000000 -0700
+++ rpld-1.8beta1/debian/init-default 2006-02-09 08:04:50.000000000 -0700
@@ -4,3 +4,4 @@
# Edit /etc/rpld.conf to fit your needs an uncomment the line below.
#START_RPLD=yes
+#INTERFACE=eth0
diff -ur rpld-1.8beta1-/debian/init.d rpld-1.8beta1/debian/init.d
--- rpld-1.8beta1-/debian/init.d 2006-02-09 08:26:22.000000000 -0700
+++ rpld-1.8beta1/debian/init.d 2006-02-09 08:55:15.000000000 -0700
@@ -25,17 +25,20 @@
echo "RPLD not configured - have a look at /etc/default/rpld"
exit 0
fi
+if [ -n "$INTERFACE" ]; then
+ INTERFACE="-i $INTERFACE"
+fi
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
- start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
- --exec $DAEMON
+ start-stop-daemon --start --quiet \
+ --exec $DAEMON -- $INTERFACE
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
- start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \
+ start-stop-daemon --oknodo --stop --quiet \
--exec $DAEMON
echo "."
;;
@@ -48,8 +51,8 @@
# directly anyway, make this a do-nothing entry.
#
# echo "Reloading $DESC configuration files."
- # start-stop-daemon --stop --signal 1 --quiet --pidfile \
- # /var/run/$NAME.pid --exec $DAEMON
+ # start-stop-daemon --stop --signal 1 --quiet \
+ # --exec $DAEMON
#;;
restart|force-reload)
#
@@ -58,11 +61,11 @@
# just the same as "restart".
#
echo -n "Restarting $DESC: $NAME"
- start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \
+ start-stop-daemon --oknodo --stop --quiet \
--exec $DAEMON
sleep 1
- start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
- --exec $DAEMON
+ start-stop-daemon --start --quiet \
+ --exec $DAEMON -- $INTERFACE
echo "."
;;
*)