diff options
author | Michael Larson <mike@ft1.vyatta.com> | 2009-09-09 16:26:01 -0700 |
---|---|---|
committer | Michael Larson <mike@ft1.vyatta.com> | 2009-09-09 16:26:01 -0700 |
commit | 5f1a33134d463fa565ee9dd43237252bd27d5fb3 (patch) | |
tree | 70f1ac5b1e76a0ae875c71ca15089ecdbc45c122 /scripts/vyatta-config-loader.pl | |
parent | 028e8e12c5e15efc0a316641f2b02e46d5c77210 (diff) | |
parent | 42abfac6f11077dbfc3b0eaf845597e38f7cd685 (diff) | |
download | vyatta-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-loader.pl')
-rwxr-xr-x | scripts/vyatta-config-loader.pl | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/scripts/vyatta-config-loader.pl b/scripts/vyatta-config-loader.pl index a32d1fc..61eafa5 100755 --- a/scripts/vyatta-config-loader.pl +++ b/scripts/vyatta-config-loader.pl @@ -46,14 +46,12 @@ sub restore_fds { } # get a list of all config statement in the startup config file -# (sorted by rank). my @all_nodes = Vyatta::ConfigLoad::getStartupConfigStatements($ARGV[0]); if (scalar(@all_nodes) == 0) { # no config statements restore_fds(); exit 1; } -my $cur_rank = ${$all_nodes[0]}[1]; # set up the config environment my $CWRAPPER = '/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper'; @@ -69,20 +67,9 @@ if ($? >> 8) { my $commit_cmd = "$CWRAPPER commit"; my $cleanup_cmd = "$CWRAPPER cleanup"; my $ret = 0; -# higher-ranked statements committed before lower-ranked. +my $rank; #not used foreach (@all_nodes) { my ($path_ref, $rank) = @$_; - if ($rank != $cur_rank) { - # commit all nodes with the same rank together. - $ret = 0; #system("$commit_cmd"); - if ($ret >> 8) { - print OLDOUT "Commit failed at rank $cur_rank\n"; - print WARN "Commit failed at rank $cur_rank\n"; - system("$cleanup_cmd"); - # continue after cleanup (or should we abort?) - } - $cur_rank = $rank; - } my $cmd = "$CWRAPPER set " . (join ' ', @$path_ref); # this debug file should be deleted before release system("echo [$cmd] >> /tmp/foo"); |