summaryrefslogtreecommitdiff
path: root/scripts/ipv6-down.sample
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ipv6-down.sample')
-rw-r--r--scripts/ipv6-down.sample20
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/ipv6-down.sample b/scripts/ipv6-down.sample
index 742bbe5..bf31574 100644
--- a/scripts/ipv6-down.sample
+++ b/scripts/ipv6-down.sample
@@ -8,24 +8,24 @@
# Kill the router advertisement daemon on this interface.
# The killing procedure is copied from RedHat 6.0 initscripts.
-DEVICE=$1
+DEVICE="$1"
-PIDFILE=/var/run/radvd-$DEVICE.pid
+PIDFILE="/var/run/radvd-$DEVICE.pid"
-[ -f $PIDFILE ] || exit 0
+[ -f "$PIDFILE" ] || exit 0
-PID=`cat $PIDFILE`
+PID="$(cat "$PIDFILE")"
if [ "$PID" != "" ]; then
- if ps h $PID >/dev/null 2>&1; then
- kill -TERM $PID
+ if ps h "$PID" >/dev/null 2>&1; then
+ kill -TERM "$PID"
usleep 10000
- if ps h $PID >/dev/null 2>&1; then
+ if ps h "$PID" >/dev/null 2>&1; then
sleep 1
- if ps h $PID >/dev/null 2>&1; then
- kill -KILL $PID
+ if ps h "$PID" >/dev/null 2>&1; then
+ kill -KILL "$PID"
fi
fi
fi
fi
-rm -f $PIDFILE
+rm -f "$PIDFILE"