summaryrefslogtreecommitdiff
path: root/src/cstore/unionfs/cstore-unionfs.hpp
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-07-23 21:00:10 -0700
committerJohn Southworth <john.southworth@vyatta.com>2011-07-23 21:00:10 -0700
commitce7b72eb71af9c5f7bf9ab0f423ec44c955a4b9a (patch)
tree9b0d64b93c5871a9b738fb711d6e06fa64025522 /src/cstore/unionfs/cstore-unionfs.hpp
parentcf6a189183122b6316ed8819dcdec19527f2e0c5 (diff)
downloadvyatta-cfg-ce7b72eb71af9c5f7bf9ab0f423ec44c955a4b9a.tar.gz
vyatta-cfg-ce7b72eb71af9c5f7bf9ab0f423ec44c955a4b9a.zip
Bugfix 7362: Make reset_paths reset to root level when resolving varrefs
Diffstat (limited to 'src/cstore/unionfs/cstore-unionfs.hpp')
-rw-r--r--src/cstore/unionfs/cstore-unionfs.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/cstore/unionfs/cstore-unionfs.hpp b/src/cstore/unionfs/cstore-unionfs.hpp
index 1240488..c56f060 100644
--- a/src/cstore/unionfs/cstore-unionfs.hpp
+++ b/src/cstore/unionfs/cstore-unionfs.hpp
@@ -154,7 +154,17 @@ private:
push_cfg_path(path_comps[i]);
}
};
- void reset_paths() {
+ void reset_paths(bool to_root=false) {
+ if (to_root){
+ char *val;
+ if ((val = getenv(C_ENV_TMPL_ROOT.c_str()))) {
+ tmpl_path = val;
+ } else {
+ tmpl_path = C_DEF_TMPL_ROOT;
+ }
+ orig_tmpl_path = val;
+ orig_mutable_cfg_path = "/";
+ }
tmpl_path = orig_tmpl_path;
mutable_cfg_path = orig_mutable_cfg_path;
};