diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-06-25 17:09:23 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-06-25 17:09:23 -0700 |
commit | d4f3eeb4f845cddaff26abe7beff5cc01e1d2cf4 (patch) | |
tree | 3518267b26fccc97fc7ae88078ad092f07e0593d | |
parent | 92fefe6e3fea41f98593073466dbfc47853cb7b6 (diff) | |
download | vyatta-cfg-d4f3eeb4f845cddaff26abe7beff5cc01e1d2cf4.tar.gz vyatta-cfg-d4f3eeb4f845cddaff26abe7beff5cc01e1d2cf4.zip |
fix for bug 5717.
-rw-r--r-- | scripts/vyatta-activate-config.pl | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/vyatta-activate-config.pl b/scripts/vyatta-activate-config.pl index 87791f3..f7079ee 100644 --- a/scripts/vyatta-activate-config.pl +++ b/scripts/vyatta-activate-config.pl @@ -88,7 +88,9 @@ if (-e $full_path) { my $leaf = "$full_path/node.val"; if (-e $leaf) { #prevent setting on leaf or multi, check for node.val - printf("Cannot deactivate end node\n"); + if (!defined $ENV{BOOT}) { + printf("Cannot deactivate end node\n"); + } exit 1; } } @@ -97,10 +99,14 @@ else { my $parent_path_leaf = $ENV{VYATTA_TEMP_CONFIG_DIR} . "/" . join('/', @parent_path) . "/node.val"; if (-e $parent_path_leaf) { #prevent setting on leaf or multi, check for node.val - printf("Cannot deactivate end node\n"); + if (!defined $ENV{BOOT}) { + printf("Cannot deactivate end node\n"); + } exit 1; } - printf("This configuration element does not exist: " . join(' ', @path) . "\n"); + if (!defined $ENV{BOOT}) { + printf("This configuration element does not exist: " . join(' ', @path) . "\n"); + } exit 1; } @@ -118,7 +124,9 @@ if ($action eq 'deactivate') { } #final check that walks up tree and checks if (!(-e "$active_dir/.disable") && check_parents(@path)) { #checks active and locally committed parents - print("Cannot deactivate nested elements\n"); + if (!defined $ENV{BOOT}) { + print("Cannot deactivate nested elements\n"); + } exit 1; } } |