diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-04-19 18:45:09 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-04-19 18:45:09 -0700 |
commit | 377f45cba7cb60b49b880dab4eb8785d28e5854b (patch) | |
tree | 52c72db131c2b4aeee7a5909744d40db20367baa | |
parent | 68defd9a6404d4e0bb0e7d248f8331a622d22a02 (diff) | |
download | vyatta-op-vpn-377f45cba7cb60b49b880dab4eb8785d28e5854b.tar.gz vyatta-op-vpn-377f45cba7cb60b49b880dab4eb8785d28e5854b.zip |
Fix Bug 5542
* allow clear and show commands for IPsec even if site-to-site is not
configured since l2tp might be using it
-rw-r--r-- | templates/clear/vpn/ipsec-process/node.def | 9 | ||||
-rw-r--r-- | templates/show/vpn/debug/detail/node.def | 7 | ||||
-rw-r--r-- | templates/show/vpn/debug/node.def | 7 |
3 files changed, 19 insertions, 4 deletions
diff --git a/templates/clear/vpn/ipsec-process/node.def b/templates/clear/vpn/ipsec-process/node.def index 8ced091..a0a3f13 100644 --- a/templates/clear/vpn/ipsec-process/node.def +++ b/templates/clear/vpn/ipsec-process/node.def @@ -1,6 +1,11 @@ help: Restart VPN ipsec process -run: if [ -d $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/site-to-site/peer ] && [ -n "`ls $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/site-to-site/peer/`" ] ; then - /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=clear-vpn-ipsec-process +run: if [ -n "`ls $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/ipsec-interfaces/interface 2>/dev/null`" ] ; then + if pgrep pluto > /dev/null + then + /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=clear-vpn-ipsec-process + else + echo IPsec process not running + fi else echo VPN ipsec not configured fi diff --git a/templates/show/vpn/debug/detail/node.def b/templates/show/vpn/debug/detail/node.def index 112cbf6..3ee980c 100644 --- a/templates/show/vpn/debug/detail/node.def +++ b/templates/show/vpn/debug/detail/node.def @@ -1,6 +1,11 @@ help: Show detailed VPN debugging information -run: if [ -d $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/site-to-site/peer ] && [ -n "`ls $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/site-to-site/peer/`" ] ; then +run: if [ -n "`ls $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/ipsec-interfaces/interface 2>/dev/null`" ] ; then + if pgrep pluto > /dev/null + then /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=show-vpn-debug-detail + else + echo IPsec process not running + fi else echo VPN ipsec not configured fi diff --git a/templates/show/vpn/debug/node.def b/templates/show/vpn/debug/node.def index 2327d95..b5848c6 100644 --- a/templates/show/vpn/debug/node.def +++ b/templates/show/vpn/debug/node.def @@ -1,6 +1,11 @@ help: Show VPN debugging information -run: if [ -d $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/site-to-site/peer ] && [ -n "`ls $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/site-to-site/peer/`" ] ; then +run: if [ -n "`ls $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/ipsec-interfaces/interface 2>/dev/null`" ] ; then + if pgrep pluto > /dev/null + then /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=show-vpn-debug + else + echo IPsec process not running + fi else echo VPN ipsec not configured fi |