From d4f3eeb4f845cddaff26abe7beff5cc01e1d2cf4 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Fri, 25 Jun 2010 17:09:23 -0700 Subject: fix for bug 5717. --- scripts/vyatta-activate-config.pl | 16 ++++++++++++---- 1 file 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; } } -- cgit v1.2.3