From 15c00f38e61c3746be23bcc80fc6c0743bc99fe2 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Thu, 20 Mar 2008 10:44:25 -0700 Subject: Fix 3023 "show vpn debug" displays system errors - don't call the debug script if vpn is not configured. --- templates/show/vpn/debug/detail/node.def | 6 +++++- templates/show/vpn/debug/node.def | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'templates/show/vpn') 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 -- cgit v1.2.3