summaryrefslogtreecommitdiff
path: root/scripts/vyatta-config-gen-sets.pl
diff options
context:
space:
mode:
authorMichael Larson <mike@ft1.vyatta.com>2009-09-09 16:26:01 -0700
committerMichael Larson <mike@ft1.vyatta.com>2009-09-09 16:26:01 -0700
commit5f1a33134d463fa565ee9dd43237252bd27d5fb3 (patch)
tree70f1ac5b1e76a0ae875c71ca15089ecdbc45c122 /scripts/vyatta-config-gen-sets.pl
parent028e8e12c5e15efc0a316641f2b02e46d5c77210 (diff)
parent42abfac6f11077dbfc3b0eaf845597e38f7cd685 (diff)
downloadvyatta-cfg-5f1a33134d463fa565ee9dd43237252bd27d5fb3.tar.gz
vyatta-cfg-5f1a33134d463fa565ee9dd43237252bd27d5fb3.zip
Merge branch 'kenwood' of http://git.vyatta.com/vyatta-cfg into kenwood
Diffstat (limited to 'scripts/vyatta-config-gen-sets.pl')
-rwxr-xr-xscripts/vyatta-config-gen-sets.pl9
1 files changed, 0 insertions, 9 deletions
diff --git a/scripts/vyatta-config-gen-sets.pl b/scripts/vyatta-config-gen-sets.pl
index 2fe4ac6..566570e 100755
--- a/scripts/vyatta-config-gen-sets.pl
+++ b/scripts/vyatta-config-gen-sets.pl
@@ -32,23 +32,14 @@ my $conf_file = '/opt/vyatta/etc/config/config.boot';
$conf_file = $ARGV[0] if defined $ARGV[0];
# get a list of all config statement in the startup config file
-# (sorted by rank).
my @all_nodes = Vyatta::ConfigLoad::getStartupConfigStatements($conf_file);
if (scalar(@all_nodes) == 0) {
# no config statements
exit 1;
}
-my $cur_rank = ${$all_nodes[0]}[1];
my $ret = 0;
-# higher-ranked statements committed before lower-ranked.
foreach (@all_nodes) {
- my ($path_ref, $rank) = @$_;
- if ($rank != $cur_rank) {
- # commit all nodes with the same rank together.
- print "commit\n";
- $cur_rank = $rank;
- }
my $cmd = "set " . (join ' ', @$path_ref);
print "$cmd\n";
}