diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-02-03 11:41:45 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-02-03 11:41:45 -0800 |
commit | f120eee288860f3fb6582100ff68d4d5a1222698 (patch) | |
tree | d9903aaecbb3ffdb635b5743a4c8f6ca9b710914 | |
parent | 381cd4352c00663ac01210a499a4c8c499e0de36 (diff) | |
download | vyatta-cfg-f120eee288860f3fb6582100ff68d4d5a1222698.tar.gz vyatta-cfg-f120eee288860f3fb6582100ff68d4d5a1222698.zip |
Simplify and add strict checks
-rwxr-xr-x | scripts/vyatta-check-typeless-node.pl | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/scripts/vyatta-check-typeless-node.pl b/scripts/vyatta-check-typeless-node.pl index 1780a5e..103141b 100755 --- a/scripts/vyatta-check-typeless-node.pl +++ b/scripts/vyatta-check-typeless-node.pl @@ -1,8 +1,7 @@ #!/usr/bin/perl +use strict; use lib "/opt/vyatta/share/perl5/"; use Vyatta::Config; -use Vyatta::Misc; -use Getopt::Long; ## Check if a typeless node exists # this is a lame little script to get around bug 2525 not being fixed. @@ -11,11 +10,5 @@ use Getopt::Long; my $node = shift; my $config = new Vyatta::Config; -if ($config->exists("$node")) { - exit 0; -} -else { - exit 1; -} - -exit 0; +exit 0 if ($config->exists("$node")); +exit 1; |