From 9b35460dbd426d8439ae00138b06de0235697294 Mon Sep 17 00:00:00 2001 From: Robert Bays Date: Sat, 22 May 2010 23:40:25 -0700 Subject: add differential noerr. now it supports one of set, del, or both. --- lib/Vyatta/Quagga/Config.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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$/))) { -- cgit v1.2.3