From f120eee288860f3fb6582100ff68d4d5a1222698 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 3 Feb 2009 11:41:45 -0800 Subject: Simplify and add strict checks --- scripts/vyatta-check-typeless-node.pl | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'scripts') 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; -- cgit v1.2.3