summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorslioch <slioch@eng-140.vyatta.com>2009-03-30 14:39:30 -0700
committerslioch <slioch@eng-140.vyatta.com>2009-03-30 14:39:30 -0700
commit1a129d69b000a2ee7bba31fddbeed4f34a5551ce (patch)
treee25ad120036ee016f365f17e53804b1ef02040fd
parentb13167543a2ee3265ccb6511760a662430ba1b29 (diff)
downloadvyatta-cfg-1a129d69b000a2ee7bba31fddbeed4f34a5551ce.tar.gz
vyatta-cfg-1a129d69b000a2ee7bba31fddbeed4f34a5551ce.zip
added noop state to commit_action env variable to make scripts happy.
-rw-r--r--src/commit2.c8
-rw-r--r--src/common/defs.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/commit2.c b/src/commit2.c
index a4f5f27..7f81850 100644
--- a/src/commit2.c
+++ b/src/commit2.c
@@ -375,6 +375,9 @@ process_func(GNode *node, gpointer data)
setenv(ENV_ACTION_NAME,ENV_ACTION_SET,1);
}
}
+ else {
+ setenv(ENV_ACTION_NAME,ENV_ACTION_NOOP,1);
+ }
if (g_dump_actions == FALSE) {
status = execute_list(c->_def.actions[result->_action].vtw_list_head,&c->_def);
@@ -392,9 +395,8 @@ process_func(GNode *node, gpointer data)
if (result->_action == delete_act) {
set_in_delete_action(FALSE);
}
- if (!IS_ACTIVE(d->_operation)) {
- unsetenv(ENV_ACTION_NAME);
- }
+
+ unsetenv(ENV_ACTION_NAME);
if (g_coverage) {
struct timeval t;
diff --git a/src/common/defs.h b/src/common/defs.h
index a26bfbc..d634b8c 100644
--- a/src/common/defs.h
+++ b/src/common/defs.h
@@ -14,7 +14,7 @@
#define ENV_ACTION_NAME "COMMIT_ACTION"
#define ENV_ACTION_DELETE "DELETE"
#define ENV_ACTION_SET "SET"
-
+#define ENV_ACTION_NOOP "NOOP"
struct Result
{