summaryrefslogtreecommitdiff
path: root/scripts/vyatta-activate-config.pl
diff options
context:
space:
mode:
authorMichael Larson <slioch@slioch.vyatta.com>2010-06-30 11:18:34 -0700
committerMichael Larson <slioch@slioch.vyatta.com>2010-06-30 11:18:34 -0700
commit8b52a2d5694847a6a375eef6ab07344d15b15032 (patch)
tree02e5dd956311aba975d357d75564959a44a2b132 /scripts/vyatta-activate-config.pl
parent4706a0ee5381e4c40ae873b656ddaef27d60b5eb (diff)
downloadvyatta-cfg-8b52a2d5694847a6a375eef6ab07344d15b15032.tar.gz
vyatta-cfg-8b52a2d5694847a6a375eef6ab07344d15b15032.zip
fix for bug 5762.
Diffstat (limited to 'scripts/vyatta-activate-config.pl')
-rw-r--r--scripts/vyatta-activate-config.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/vyatta-activate-config.pl b/scripts/vyatta-activate-config.pl
index f7079ee..6bf6c3b 100644
--- a/scripts/vyatta-activate-config.pl
+++ b/scripts/vyatta-activate-config.pl
@@ -41,8 +41,8 @@ sub wanted_local {
sub check_parents {
my @p = @_;
- my $l_dir = "$ENV{VYATTA_TEMP_CONFIG_DIR}/";
- my $a_dir = "$ENV{VYATTA_ACTIVE_CONFIGURATION_DIR}/";
+ my $l_dir = "$ENV{VYATTA_TEMP_CONFIG_DIR}/$ENV{VYATTA_EDIT_LEVEL}";
+ my $a_dir = "$ENV{VYATTA_ACTIVE_CONFIGURATION_DIR}/$ENV{VYATTA_EDIT_LEVEL}";
foreach my $sw (@p) {
$l_dir .= "/$sw";
$a_dir .= "/$sw";
@@ -80,7 +80,9 @@ foreach my $elem (@path) {
$elem =~ s/\s+/\//g;
$path[$i++] = $elem;
}
-my $path = join '/', @path;
+my $edit_level = "$ENV{VYATTA_EDIT_LEVEL}";
+
+my $path = $edit_level . join '/', @path;
my $full_path = "$ENV{VYATTA_TEMP_CONFIG_DIR}/$path";
@@ -96,7 +98,7 @@ if (-e $full_path) {
}
else {
#check if this is a leaf node with value
- my $parent_path_leaf = $ENV{VYATTA_TEMP_CONFIG_DIR} . "/" . join('/', @parent_path) . "/node.val";
+ my $parent_path_leaf = $ENV{VYATTA_TEMP_CONFIG_DIR} . "/" . $edit_level . join('/', @parent_path) . "/node.val";
if (-e $parent_path_leaf) {
#prevent setting on leaf or multi, check for node.val
if (!defined $ENV{BOOT}) {