diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-04-01 12:37:35 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-04-01 12:37:35 -0700 |
commit | 35642e2e10aff32335690a5af2710bbb9ec3ea13 (patch) | |
tree | eec192d3b39b27daae0258ea1bd4ae26452a0ee6 /scripts | |
parent | 2ad53e3ae6bd073785df8f99121b89683df744a2 (diff) | |
download | vyatta-cfg-35642e2e10aff32335690a5af2710bbb9ec3ea13.tar.gz vyatta-cfg-35642e2e10aff32335690a5af2710bbb9ec3ea13.zip |
fix for bug 2689: sort tag nodes appropriately
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/VyattaConfigOutput.pm | 3 |
1 files changed, 3 insertions, 0 deletions
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 |