Added pluto/whack output to 'ipsec leases'.

This commit is contained in:
Tobias Brunner
2010-04-06 12:47:40 +02:00
parent 6bfa8e907c
commit e82b5755be
+11 -2
View File
@@ -67,7 +67,7 @@ case "$1" in
echo " rereadacerts|rereadcrls|rereadall" echo " rereadacerts|rereadcrls|rereadall"
echo " purgeocsp|purgeike" echo " purgeocsp|purgeike"
echo " scencrypt|scdecrypt <value> [--inbase <base>] [--outbase <base>] [--keyid <id>]" echo " scencrypt|scdecrypt <value> [--inbase <base>] [--outbase <base>] [--keyid <id>]"
echo " openac" echo " openac"
echo " pluto" echo " pluto"
echo " scepclient" echo " scepclient"
echo " secrets" echo " secrets"
@@ -149,6 +149,15 @@ leases)
op="$1" op="$1"
rc=7 rc=7
shift shift
if [ -e $IPSEC_PLUTO_PID ]
then
case "$#" in
0) $IPSEC_WHACK "--$op" ;;
1) $IPSEC_WHACK "--$op" --name "$1" ;;
*) $IPSEC_WHACK "--$op" --name "$1" --lease-addr "$2" ;;
esac
rc="$?"
fi
if [ -e $IPSEC_CHARON_PID ] if [ -e $IPSEC_CHARON_PID ]
then then
case "$#" in case "$#" in
@@ -330,7 +339,7 @@ stop)
fi fi
fi fi
else else
echo "Stopping strongSwan IPsec failed: starter is not running" >&2 echo "Stopping strongSwan IPsec failed: starter is not running" >&2
fi fi
if [ -d /var/lock/subsys ]; then if [ -d /var/lock/subsys ]; then
rm -f /var/lock/subsys/ipsec rm -f /var/lock/subsys/ipsec