Fix authentication on second time around with multilink and persist
[ppp.git] / scripts / ipv6-down.sample
index 742bbe53d8069bb7951dd7dc893beb06d51edc6e..bf315747cea5c72d6468323efb6b3c401a576197 100644 (file)
@@ -8,24 +8,24 @@
 # Kill the router advertisement daemon on this interface.
 # The killing procedure is copied from RedHat 6.0 initscripts.
 
 # 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 [ "$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
        usleep 10000
-       if ps h $PID >/dev/null 2>&1; then
+       if ps h "$PID" >/dev/null 2>&1; then
            sleep 1
            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
 
            fi
        fi
     fi
 fi
 
-rm -f $PIDFILE
+rm -f "$PIDFILE"