summaryrefslogtreecommitdiff
path: root/scripts/vyatta_quagga_utils.pl
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-29 14:31:40 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-29 14:31:40 -0800
commit249ab61b9d1b697f20db0a4adac6b7769f9b4312 (patch)
tree605ff40384ef280503e032449437e20d15966206 /scripts/vyatta_quagga_utils.pl
parent7333d21e1a93fa73cbb030839a7a97a82a76471a (diff)
downloadvyatta-cfg-quagga-249ab61b9d1b697f20db0a4adac6b7769f9b4312.tar.gz
vyatta-cfg-quagga-249ab61b9d1b697f20db0a4adac6b7769f9b4312.zip
Fix exists/not exists function
The operator precendence in perl is not same as C.
Diffstat (limited to 'scripts/vyatta_quagga_utils.pl')
-rwxr-xr-xscripts/vyatta_quagga_utils.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/vyatta_quagga_utils.pl b/scripts/vyatta_quagga_utils.pl
index c0087ea6..b6fe5ce2 100755
--- a/scripts/vyatta_quagga_utils.pl
+++ b/scripts/vyatta_quagga_utils.pl
@@ -33,14 +33,16 @@ sub check_exists {
my $node = shift;
my $config = new Vyatta::Config;
- exit $config->exists($node) ? 0 : 1;
+ exit 0 if $config->exists($node);
+ exit 1;
}
sub check_not_exists {
my $node = shift;
my $config = new Vyatta::Config;
- exit $config->exists($node) ? 1 : 0;
+ exit 0 if ! $config->exists($node);
+ exit 1;
}
sub check_ospf_area {