diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2017-04-01 16:26:44 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2017-04-01 16:26:44 +0200 |
commit | dc9380af81fbce8e1a9532b07bc671b9d346101b (patch) | |
tree | 219f7df0b01243ac1c41c7f679d1b4c6aef36b27 /src/ipsec/_ipsec.in | |
parent | 212c0ba74c0e453497b840f9cd131ec99f73754a (diff) | |
parent | 05ddd767992d68bb38c7f16ece142e8c2e9ae016 (diff) | |
download | vyos-strongswan-dc9380af81fbce8e1a9532b07bc671b9d346101b.tar.gz vyos-strongswan-dc9380af81fbce8e1a9532b07bc671b9d346101b.zip |
Merge tag 'upstream/5.5.2'
Upstream version 5.5.2
Diffstat (limited to 'src/ipsec/_ipsec.in')
-rw-r--r-- | src/ipsec/_ipsec.in | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/ipsec/_ipsec.in b/src/ipsec/_ipsec.in index a002614fe..ea399b8c4 100644 --- a/src/ipsec/_ipsec.in +++ b/src/ipsec/_ipsec.in @@ -44,6 +44,8 @@ export IPSEC_DIR IPSEC_BINDIR IPSEC_SBINDIR IPSEC_CONFDIR IPSEC_PIDDIR IPSEC_SCR IPSEC_DISTRO="Institute for Internet Technologies and Applications\nUniversity of Applied Sciences Rapperswil, Switzerland" +command_dir="$IPSEC_DIR" + case "$1" in '') echo "$IPSEC_SCRIPT command [arguments]" @@ -94,10 +96,6 @@ case "$1" in echo "$IPSEC_PIDDIR" exit 0 ;; -copyright|--copyright) - set _copyright - # and fall through, invoking "ipsec _copyright" - ;; down) shift if [ "$#" -ne 1 ] @@ -307,13 +305,19 @@ update) exit 7 fi ;; -pki) - shift - exec $IPSEC_BINDIR/pki "$@" +aikgen|pki) + # programs in BINDIR may be called directly, these two are listed for legacy reasons + command_dir="$IPSEC_BINDIR" + # fall through ;; -aikgen) - shift - exec $IPSEC_BINDIR/aikgen "$@" +attest|conftest|dumm|irdumm|pacman|pool|pt-tls-client|scepclient|stroke|\ +duplicheck|error-notify|imv_policy_manager|load-tester|lookip|whitelist|\ +_updown|_imv_policy) + # fall through + ;; +copyright|--copyright) + set _copyright + # fall through ;; version|--version) printf "$OS_NAME $IPSEC_NAME $IPSEC_VERSION\n" @@ -325,16 +329,20 @@ version|--version) echo "$0: unknown option \`$1' (perhaps command name was omitted?)" >&2 exit 2 ;; +*) + echo "$0: unknown command \`$1' (\`$IPSEC_SCRIPT --help' for list)" >&2 + exit 2 + ;; esac cmd="$1" shift -path="$IPSEC_DIR/$cmd" +path="$command_dir/$cmd" if [ ! -x "$path" ] then - echo "$0: unknown IPsec command \`$cmd' (\`$IPSEC_SCRIPT --help' for list)" >&2 + echo "$0: unknown command \`$cmd' (\`$IPSEC_SCRIPT --help' for list)" >&2 exit 2 fi |