mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-16 00:00:37 -04:00
Added pluto/whack output to 'ipsec leases'.
This commit is contained in:
parent
6bfa8e907c
commit
e82b5755be
@ -2,13 +2,13 @@
|
|||||||
# prefix command to run stuff from our programs directory
|
# prefix command to run stuff from our programs directory
|
||||||
# Copyright (C) 1998-2002 Henry Spencer.
|
# Copyright (C) 1998-2002 Henry Spencer.
|
||||||
# Copyright (C) 2006 Andreas Steffen
|
# Copyright (C) 2006 Andreas Steffen
|
||||||
# Copyright (C) 2006 Martin Willi
|
# Copyright (C) 2006 Martin Willi
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by the
|
# under the terms of the GNU General Public License as published by the
|
||||||
# Free Software Foundation; either version 2 of the License, or (at your
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful, but
|
# This program is distributed in the hope that it will be useful, but
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
@ -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"
|
||||||
@ -138,17 +138,26 @@ listcards|rereadgroups)
|
|||||||
$IPSEC_WHACK "$@" "--$op"
|
$IPSEC_WHACK "$@" "--$op"
|
||||||
rc="$?"
|
rc="$?"
|
||||||
fi
|
fi
|
||||||
if [ -e $IPSEC_CHARON_PID ]
|
if [ -e $IPSEC_CHARON_PID ]
|
||||||
then
|
then
|
||||||
exit 3
|
exit 3
|
||||||
else
|
else
|
||||||
exit 7
|
exit 7
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
leases)
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user