summaryrefslogtreecommitdiff
path: root/src/common/unionfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/unionfs.c')
-rw-r--r--src/common/unionfs.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/common/unionfs.c b/src/common/unionfs.c
index b053d80..c428dfa 100644
--- a/src/common/unionfs.c
+++ b/src/common/unionfs.c
@@ -605,7 +605,7 @@ set_path(char *path, boolean config)
*
**/
void
-common_commit_copy_to_live_config(GNode *node, boolean test_mode)
+common_commit_copy_to_live_config(GNode *node, boolean suppress_piecewise_copy, boolean test_mode)
{
//first check for existence of path before committing
char *path = ((struct VyattaNode*)(node->data))->_data._path;
@@ -689,7 +689,20 @@ common_commit_copy_to_live_config(GNode *node, boolean test_mode)
system(command);
}
- piecewise_copy(node, test_mode);
+ if (suppress_piecewise_copy) {
+ sprintf(command, format1, tbuf_root, abuf_root);
+ if (g_debug) {
+ printf("%s\n",command);
+ syslog(LOG_DEBUG,"%s\n",command);
+ fflush(NULL);
+ }
+ if (test_mode == FALSE) {
+ system(command);
+ }
+ }
+ else {
+ piecewise_copy(node, test_mode);
+ }
sprintf(command, format8, cbuf_root,abuf_root,mbuf_root);
if (g_debug) {