| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# This script is called with the following parameters: |
| 4 |
# interface tty speed local-address remote-address ipparam |
| 5 |
# |
| 6 |
|
| 7 |
|
| 8 |
# Kill the router advertisement daemon on this interface. |
| 9 |
# The killing procedure is copied from RedHat 6.0 initscripts. |
| 10 |
|
| 11 |
DEVICE="$1" |
| 12 |
|
| 13 |
PIDFILE="/var/run/radvd-$DEVICE.pid" |
| 14 |
|
| 15 |
[ -f "$PIDFILE" ] || exit 0 |
| 16 |
|
| 17 |
PID="$(cat "$PIDFILE")" |
| 18 |
if [ "$PID" != "" ]; then |
| 19 |
if ps h "$PID" >/dev/null 2>&1; then |
| 20 |
kill -TERM "$PID" |
| 21 |
usleep 10000 |
| 22 |
if ps h "$PID" >/dev/null 2>&1; then |
| 23 |
sleep 1 |
| 24 |
if ps h "$PID" >/dev/null 2>&1; then |
| 25 |
kill -KILL "$PID" |
| 26 |
fi |
| 27 |
fi |
| 28 |
fi |
| 29 |
fi |
| 30 |
|
| 31 |
rm -f "$PIDFILE" |