Restconf: include -E configdir when starting restconf daemon
This commit is contained in:
parent
9df084958e
commit
18c29f018a
2 changed files with 14 additions and 1 deletions
|
|
@ -270,6 +270,8 @@ restconf_pseudo_process_control(clixon_handle h)
|
||||||
#ifdef RESTCONF_INLINE
|
#ifdef RESTCONF_INLINE
|
||||||
nr += 2;
|
nr += 2;
|
||||||
#endif
|
#endif
|
||||||
|
if (clicon_option_str(h, "CLICON_CONFIGDIR"))
|
||||||
|
nr += 2;
|
||||||
if ((argv = calloc(nr, sizeof(char *))) == NULL){
|
if ((argv = calloc(nr, sizeof(char *))) == NULL){
|
||||||
clixon_err(OE_UNIX, errno, "calloc");
|
clixon_err(OE_UNIX, errno, "calloc");
|
||||||
goto done;
|
goto done;
|
||||||
|
|
@ -315,6 +317,10 @@ restconf_pseudo_process_control(clixon_handle h)
|
||||||
argv[i++] = pgm;
|
argv[i++] = pgm;
|
||||||
argv[i++] = "-f";
|
argv[i++] = "-f";
|
||||||
argv[i++] = clicon_option_str(h, "CLICON_CONFIGFILE");
|
argv[i++] = clicon_option_str(h, "CLICON_CONFIGFILE");
|
||||||
|
if (clicon_option_str(h, "CLICON_CONFIGDIR")) {
|
||||||
|
argv[i++] = "-E";
|
||||||
|
argv[i++] = clicon_option_str(h, "CLICON_CONFIGDIR");
|
||||||
|
}
|
||||||
/* Add debug if backend has debug.
|
/* Add debug if backend has debug.
|
||||||
* There is also a debug flag in clixon-restconf.yang but it kicks in after it starts
|
* There is also a debug flag in clixon-restconf.yang but it kicks in after it starts
|
||||||
* see restconf_pseudo_set_log which sets flag when process starts
|
* see restconf_pseudo_set_log which sets flag when process starts
|
||||||
|
|
|
||||||
|
|
@ -676,7 +676,14 @@ restconf_clixon_backend(clixon_handle h,
|
||||||
clicon_session_id_set(h, id);
|
clicon_session_id_set(h, id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((nsc = xml_nsctx_init(NULL, CLIXON_RESTCONF_NS)) == NULL)
|
if ((nsc = xml_nsctx_init(NULL,
|
||||||
|
/* XXX HARDCODED NAMESPACE NEEDS GENERIC MECHANISM */
|
||||||
|
#if 1
|
||||||
|
"http://clicon.org/controller"
|
||||||
|
#else
|
||||||
|
CLIXON_RESTCONF_NS
|
||||||
|
#endif
|
||||||
|
)) == NULL)
|
||||||
goto done;
|
goto done;
|
||||||
if ((pw = getpwuid(getuid())) == NULL){
|
if ((pw = getpwuid(getuid())) == NULL){
|
||||||
clixon_err(OE_UNIX, errno, "getpwuid");
|
clixon_err(OE_UNIX, errno, "getpwuid");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue