summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bays <robert@vyatta.com>2010-12-03 17:19:47 -0800
committerRobert Bays <robert@vyatta.com>2010-12-14 11:11:43 -0800
commit9ef70e684a5587acade7ef1340e61d6e8ccf7c04 (patch)
treef55880b8b3e8edf2100a377ccc9d3c75974655c1
parent660ac6e725e9a9596e489e93529c985fa1defd7f (diff)
downloadvyatta-cfg-quagga-9ef70e684a5587acade7ef1340e61d6e8ccf7c04.tar.gz
vyatta-cfg-quagga-9ef70e684a5587acade7ef1340e61d6e8ccf7c04.zip
fix ordering for non-consistent commands
-rw-r--r--lib/Vyatta/Quagga/Config.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Vyatta/Quagga/Config.pm b/lib/Vyatta/Quagga/Config.pm
index b61180c7..ed246298 100644
--- a/lib/Vyatta/Quagga/Config.pm
+++ b/lib/Vyatta/Quagga/Config.pm
@@ -213,12 +213,14 @@ sub _setConfigTree {
# and now send the commands to quagga
foreach my $line (sort $sortfunc @com_array) {
- my ($command, $noerr);
+ my ($order, $command, $noerr);
# remove the ordered_list sorting meta-data
$line =~ s/\s+\d+:::/ /;
+ # remove the sort order prepend
+ ($order, $command) = split / !!!\?\?\? /, $line;
# split for our noeer info
- ($command, $noerr) = split / !!\?\? /, $line;
+ ($command, $noerr) = split / !!\?\? /, $command;
if (! _sendQuaggaCommand("$command", "$noerr")) { return 0; }
}
@@ -454,7 +456,7 @@ sub _qtree {
if (defined $vals[0]) {
foreach my $val (@vals) {
my $var = _qVarReplace("$level $node $val", $qcom->{$qcommand}->{$action});
- push @{$vtysh->{"$qcommand"}}, $var;
+ push @{$vtysh->{"$qcommand"}}, "$level $node $val !!!??? $var";
if ($_DEBUG) {
print "DEBUG: _qtree leaf node command: set $level $action $node $val \n\t\t\t\t\t$var\n";
}
@@ -463,7 +465,7 @@ sub _qtree {
else {
my $var = _qVarReplace("$level $node", $qcom->{$qcommand}->{$action});
- push @{$vtysh->{"$qcommand"}}, $var;
+ push @{$vtysh->{"$qcommand"}}, "$level $node !!!??? $var";
if ($_DEBUG) {
print "DEBUG: _qtree node command: set $level $action $node \n\t\t\t\t$var\n";
}