summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-04-01 10:08:14 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2008-04-01 10:08:14 -0700
commit053d42ea27a5b89f0a19a09dd347bc37c6f07948 (patch)
treea3074d7b712b6686b3d3a718cc9e72955ceaa132
parent1f35cd2755bd37986a7c5a7065f545f849126491 (diff)
downloadvyatta-cfg-053d42ea27a5b89f0a19a09dd347bc37c6f07948.tar.gz
vyatta-cfg-053d42ea27a5b89f0a19a09dd347bc37c6f07948.zip
fix for bug 2689: sort tag nodes appropriately
-rw-r--r--debian/control1
-rwxr-xr-xscripts/VyattaConfigOutput.pm3
2 files changed, 4 insertions, 0 deletions
diff --git a/debian/control b/debian/control
index 5a06588..2fdbcfe 100644
--- a/debian/control
+++ b/debian/control
@@ -18,6 +18,7 @@ Depends: sed (>= 4.1.5),
dhcp3-client | vyatta-dhcp3-client,
bsdutils (>=1:2.13),
libc6 (>= 2.7-6),
+ libsort-versions-perl,
vlan
Replaces: vyatta-cfg-firewall
Suggests: util-linux (>= 2.13-5),
diff --git a/scripts/VyattaConfigOutput.pm b/scripts/VyattaConfigOutput.pm
index b7c5499..2766b64 100755
--- a/scripts/VyattaConfigOutput.pm
+++ b/scripts/VyattaConfigOutput.pm
@@ -32,6 +32,7 @@ package VyattaConfigOutput;
use strict;
use lib '/opt/vyatta/share/perl5/';
use VyattaConfig;
+use Sort::Versions;
# whether to show default values
my $show_all = 0;
@@ -190,6 +191,7 @@ sub displayDeletedOrigChildren {
$dont_show_as_deleted);
} elsif (scalar($#cnames) >= 0) {
if ($is_tag) {
+ @cnames = sort versioncmp @cnames;
foreach my $cname (@cnames) {
if ($cname eq 'node.val') {
# should not happen
@@ -244,6 +246,7 @@ sub displayChildren {
displayValues([ @cur_path, $child ], $prefix, $child);
} elsif (scalar($#cnames) >= 0) {
if ($is_tag) {
+ @cnames = sort versioncmp @cnames;
foreach my $cname (@cnames) {
if ($cname eq 'node.val') {
# should not happen