summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Bays <robert@vyatta.com>2010-12-03 17:19:47 -0800
committerRobert Bays <robert@vyatta.com>2010-12-03 17:19:47 -0800
commit40bc37ab4e59a0cab59a6817aeedf86a759cb183 (patch)
tree5d69b49ade1413265fac59008c7c31530c5f8af4 /lib
parent8e240d934a36b89a6cb7e36becf0ab75112e7c43 (diff)
downloadvyatta-cfg-quagga-40bc37ab4e59a0cab59a6817aeedf86a759cb183.tar.gz
vyatta-cfg-quagga-40bc37ab4e59a0cab59a6817aeedf86a759cb183.zip
fix ordering for non-consistent commands
Diffstat (limited to 'lib')
-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 1730f4e1..9b743502 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";
}