summaryrefslogtreecommitdiff
path: root/scripts/vyatta-show-interfaces.pl
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-02-18 10:13:52 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-02-18 10:13:52 -0800
commitfb55afa742b7976f9d22e7f0136756f25549d5c9 (patch)
tree87ee40ddef80859d1d420a76a8fc1f0289715926 /scripts/vyatta-show-interfaces.pl
parentcf6dc75cbc85c5766cc1ac8601730163aa3748ae (diff)
downloadvyatta-op-fb55afa742b7976f9d22e7f0136756f25549d5c9.tar.gz
vyatta-op-fb55afa742b7976f9d22e7f0136756f25549d5c9.zip
Invalid action should cause usage message
Don't expect this script used directly, but make it more useful.
Diffstat (limited to 'scripts/vyatta-show-interfaces.pl')
-rwxr-xr-xscripts/vyatta-show-interfaces.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/vyatta-show-interfaces.pl b/scripts/vyatta-show-interfaces.pl
index 46f024a..4d89bc3 100755
--- a/scripts/vyatta-show-interfaces.pl
+++ b/scripts/vyatta-show-interfaces.pl
@@ -343,7 +343,7 @@ sub usage {
print " NAME = ", join(' | ', get_intf_for_type()), "\n";
print " TYPE = ", join(' | ', Vyatta::Interface::interface_types()), "\n";
print " ACTION = ", join(' | ', keys %action_hash), "\n";
- exit 0;
+ exit 1;
}
#
@@ -376,7 +376,8 @@ my $func;
if (defined $action_hash{$action}) {
$func = $action_hash{$action};
} else {
- die "Invalid action [$action]\n";
+ print "Invalid action [$action]\n";
+ usage();
}
#