summaryrefslogtreecommitdiff
path: root/templates/show/vpn
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-03-20 10:44:25 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-03-20 10:44:25 -0700
commit15c00f38e61c3746be23bcc80fc6c0743bc99fe2 (patch)
tree8b9ac1ba885a64911b19d36fbd3dcc46a5c86bed /templates/show/vpn
parent5d1722915113f8bd1ec1437efc0845cd1b063625 (diff)
downloadvyatta-op-vpn-15c00f38e61c3746be23bcc80fc6c0743bc99fe2.tar.gz
vyatta-op-vpn-15c00f38e61c3746be23bcc80fc6c0743bc99fe2.zip
Fix 3023 "show vpn debug" displays system errors
- don't call the debug script if vpn is not configured.
Diffstat (limited to 'templates/show/vpn')
-rw-r--r--templates/show/vpn/debug/detail/node.def6
-rw-r--r--templates/show/vpn/debug/node.def6
2 files changed, 10 insertions, 2 deletions
diff --git a/templates/show/vpn/debug/detail/node.def b/templates/show/vpn/debug/detail/node.def
index 36acbea..9416671 100644
--- a/templates/show/vpn/debug/detail/node.def
+++ b/templates/show/vpn/debug/detail/node.def
@@ -1,2 +1,6 @@
help: Show detailed VPN debugging information
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=show-vpn-debug-detail
+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
+ sudo /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=show-vpn-debug-detail
+ else
+ echo VPN ipsec not configured
+ fi
diff --git a/templates/show/vpn/debug/node.def b/templates/show/vpn/debug/node.def
index 4a7e336..f2b46e9 100644
--- a/templates/show/vpn/debug/node.def
+++ b/templates/show/vpn/debug/node.def
@@ -1,2 +1,6 @@
help: Show VPN debugging information
-run: sudo /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=show-vpn-debug
+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
+ sudo /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=show-vpn-debug
+ else
+ echo VPN ipsec not configured
+ fi