ipsec up|down|route|delete require a connection name

This commit is contained in:
Andreas Steffen
2006-05-29 07:17:55 +00:00
parent ecadab2ba7
commit b83200569e
2 changed files with 68 additions and 19 deletions
+15
View File
@@ -96,6 +96,11 @@ case "$1" in
;;
down)
shift
if [ "$#" -ne 1 ]
then
echo "Usage: ipsec down <connection name>"
exit 1
fi
if test -e $IPSEC_PLUTO_PID
then
$IPSEC_WHACK --name "$1" --terminate
@@ -160,6 +165,11 @@ restart)
route|unroute)
op="$1"
shift
if [ "$#" -ne 1 ]
then
echo "Usage: ipsec $op <connection name>"
exit 1
fi
if test -e $IPSEC_PLUTO_PID
then
$IPSEC_WHACK --name "$1" "--$op"
@@ -223,6 +233,11 @@ stop)
;;
up)
shift
if [ "$#" -ne 1 ]
then
echo "Usage: ipsec up <connection name>"
exit 1
fi
if test -e $IPSEC_PLUTO_PID
then
$IPSEC_WHACK --name "$1" --initiate