diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-29 14:31:40 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-29 14:31:40 -0800 |
commit | 249ab61b9d1b697f20db0a4adac6b7769f9b4312 (patch) | |
tree | 605ff40384ef280503e032449437e20d15966206 /scripts/vyatta_quagga_utils.pl | |
parent | 7333d21e1a93fa73cbb030839a7a97a82a76471a (diff) | |
download | vyatta-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-x | scripts/vyatta_quagga_utils.pl | 6 |
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 { |