From 0d1bc4bc9d33d163a9482e7c6567f3cd94a99507 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 21 Feb 2008 23:22:50 -0800 Subject: add error checking for show command --- scripts/vyatta-show-nat.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/vyatta-show-nat.pl b/scripts/vyatta-show-nat.pl index d046ab5..7997d48 100755 --- a/scripts/vyatta-show-nat.pl +++ b/scripts/vyatta-show-nat.pl @@ -10,6 +10,11 @@ sub numerically { $a <=> $b; } exit 1 if ($#ARGV != 0); my $xsl_file = $ARGV[0]; +if (! -e $xsl_file) { + print "Invalid XSL file \"$xsl_file\"\n"; + exit 1; +} + my %stats = ( source => [ ], destination => [ ], -- cgit v1.2.3