summaryrefslogtreecommitdiff
path: root/src/cli_new.c
diff options
context:
space:
mode:
authorMichael Larson <slioch@slioch.vyatta.com>2010-06-08 17:05:44 -0700
committerMichael Larson <slioch@slioch.vyatta.com>2010-06-08 17:05:44 -0700
commit137a9d8c3944819791f045cf7491e59017a71c80 (patch)
tree2e038098ca50b56bdbc068c4f24bb0f5d1312080 /src/cli_new.c
parent6ec3c03e294c15ce7a4a746468424a96efdb380e (diff)
downloadvyatta-cfg-137a9d8c3944819791f045cf7491e59017a71c80.tar.gz
vyatta-cfg-137a9d8c3944819791f045cf7491e59017a71c80.zip
fix for bug 5667. Moved the location of the deactivate check.
Diffstat (limited to 'src/cli_new.c')
-rw-r--r--src/cli_new.c33
1 files changed, 10 insertions, 23 deletions
diff --git a/src/cli_new.c b/src/cli_new.c
index 842a4a2..b5d7add 100644
--- a/src/cli_new.c
+++ b/src/cli_new.c
@@ -98,9 +98,6 @@ static int set_reference_environment(const char* var_reference,
clind_path_ref *n_tmpl_path,
clind_path_ref *n_cmd_path,
int active);
-static boolean
-is_deactivated(const clind_path_ref *path,const char *symbol) ;
-
/*************************************************
GLOBAL FUNCTIONS
***************************************************/
@@ -1553,18 +1550,15 @@ static int expand_string(char *stringp)
memset(&cv,0,sizeof(cv));
- if (is_deactivated(&n_cfg_path,scanp) == FALSE) {
-
- if(clind_config_engine_apply_command_path(n_cfg_path,
- n_tmpl_path,
- n_cmd_path,
- TRUE,
- &cv,
- get_tdirp(),
- FALSE)==0) {
- cp=cv.value;
-
- }
+ if(clind_config_engine_apply_command_path(n_cfg_path,
+ n_tmpl_path,
+ n_cmd_path,
+ TRUE,
+ &cv,
+ get_tdirp(),
+ FALSE)==0) {
+ cp=cv.value;
+
}
}
@@ -2402,7 +2396,7 @@ system_out(const char *command)
boolean
-is_deactivated(const clind_path_ref *path,const char *symbol)
+is_deactivated(const clind_path_ref *path)
{
if (path == NULL) {
return FALSE;
@@ -2413,13 +2407,6 @@ is_deactivated(const clind_path_ref *path,const char *symbol)
char buf[1024]; //ALSO USED AS LIMIT IN UNIONFS path length
strcpy(buf,path_string);
- //now append symbol
- if (symbol != NULL && strlen(symbol) > 2) {
- strcat(buf,"/");
- strncat(buf,symbol,strlen(symbol)-2);
- }
-
-
//first we'll check the current directory
char file[1024];
sprintf(file,"%s/.disable",buf);