diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-02-21 23:22:50 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-02-21 23:22:50 -0800 |
commit | 0d1bc4bc9d33d163a9482e7c6567f3cd94a99507 (patch) | |
tree | 9fee437e1fbf39def3deb8c939ad3c232f5d02aa | |
parent | ec188eedeb370b4433a0bdb5b958f72588894fc7 (diff) | |
download | vyatta-nat-0d1bc4bc9d33d163a9482e7c6567f3cd94a99507.tar.gz vyatta-nat-0d1bc4bc9d33d163a9482e7c6567f3cd94a99507.zip |
add error checking for show command
-rwxr-xr-x | scripts/vyatta-show-nat.pl | 5 |
1 files changed, 5 insertions, 0 deletions
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 => [ ], |