diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-05 16:50:44 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-05-05 16:50:44 -0700 |
commit | 0d020c8b938443ac8875bcfcff231dd1bf0d1d41 (patch) | |
tree | 1f82593a10110b9b2872992e3dcdfe5a19115e32 /scripts/vyatta-config-loader.pl | |
parent | 0ffdc5e6d89f9677694a8eef916b07c089264753 (diff) | |
download | vyatta-cfg-0d020c8b938443ac8875bcfcff231dd1bf0d1d41.tar.gz vyatta-cfg-0d020c8b938443ac8875bcfcff231dd1bf0d1d41.zip |
boot loader support now added. various bug fixes and some small rework.
Diffstat (limited to 'scripts/vyatta-config-loader.pl')
-rwxr-xr-x | scripts/vyatta-config-loader.pl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/vyatta-config-loader.pl b/scripts/vyatta-config-loader.pl index 61eafa5..7a3df2b 100755 --- a/scripts/vyatta-config-loader.pl +++ b/scripts/vyatta-config-loader.pl @@ -70,7 +70,16 @@ my $ret = 0; my $rank; #not used foreach (@all_nodes) { my ($path_ref, $rank) = @$_; - my $cmd = "$CWRAPPER set " . (join ' ', @$path_ref); + + my @pr = @$path_ref; + if (@pr[0] eq '!') { + @pr = @pr[1..$#pr]; + my $deactivate_cmd = "$CWRAPPER deactivate " . (join ' ', @pr) . " 1>/dev/null"; + system("$deactivate_cmd"); + #ignore these errors due to nesting warnings. + } + + my $cmd = "$CWRAPPER set " . (join ' ', @pr); # this debug file should be deleted before release system("echo [$cmd] >> /tmp/foo"); $ret = system("$cmd"); |