diff options
author | Robert Bays <rbays@roatan.(none)> | 2010-05-22 23:40:25 -0700 |
---|---|---|
committer | Robert Bays <rbays@roatan.(none)> | 2010-05-22 23:40:25 -0700 |
commit | 9b35460dbd426d8439ae00138b06de0235697294 (patch) | |
tree | 57ede3fa833144d48429b32ae9b36e50e86f16f8 | |
parent | 674a60ba8dc885f0d1a7775fdfc000c653a76deb (diff) | |
download | vyatta-cfg-quagga-9b35460dbd426d8439ae00138b06de0235697294.tar.gz vyatta-cfg-quagga-9b35460dbd426d8439ae00138b06de0235697294.zip |
add differential noerr. now it supports one of set, del, or both.
-rw-r--r-- | lib/Vyatta/Quagga/Config.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Vyatta/Quagga/Config.pm b/lib/Vyatta/Quagga/Config.pm index 3f4cfa07..8b463bf4 100644 --- a/lib/Vyatta/Quagga/Config.pm +++ b/lib/Vyatta/Quagga/Config.pm @@ -156,6 +156,7 @@ sub _setConfigTree { print "\n"; } + # This loop walks the list of commands and sends to quagga if appropriate foreach my $key (sort $sortfunc keys %$vtyshref) { if ($_DEBUG >= 3) { print "DEBUG: _setConfigTree - key $key\n"; } @@ -173,7 +174,10 @@ sub _setConfigTree { # should we run the vtysh command with noerr? my $noerr = ''; - if ($qcom->{$key}->{'noerr'}) { $noerr = 1; } + if ( (defined $qcom->{$key}->{'noerr'}) && ( + ($qcom->{$key}->{'noerr'} eq "both") || + (($qcom->{$key}->{'noerr'} eq "del") && ($delete)) || + (($qcom->{$key}->{'noerr'} eq "set") && (!$delete)))) { $noerr = 1; } # this conditional matches key to level exactly or if recurse, start of key to level if ((($recurse) && ($key =~ /^$level/)) || ((! $recurse) && ($key =~ /^$level$/))) { |