Skip to content
Snippets Groups Projects
Commit b94cef14 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

module frontend service file location fix the module directory destination

parent 06256bdc
No related branches found
No related tags found
No related merge requests found
......@@ -335,7 +335,7 @@ extern int write_dependencies(unsigned int nga,unsigned int idga,char const *dst
extern int write_env(char const *name,stralloc *sa,char const *dst) ;
extern int write_oneshot_logger(stralloc *destlog, sv_alltype *sv) ;
/** module */
extern int parse_module(sv_alltype *sv_before,ssexec_t *info,stralloc *parsed_list,stralloc *tree_list, char const *svname,unsigned int *nbsv, stralloc *sasv,uint8_t force,uint8_t conf) ;
extern int parse_module(sv_alltype *sv_before,ssexec_t *info,stralloc *parsed_list,stralloc *tree_list, char const *svname,char const *src_frontend,unsigned int *nbsv, stralloc *sasv,uint8_t force,uint8_t conf) ;
extern int regex_get_file_name(char *filename,char const *str) ;
extern int regex_get_replace(char *replace, char const *str) ;
extern int regex_get_regex(char *regex, char const *str) ;
......
......@@ -111,7 +111,7 @@ extern void ss_resolve_free(ss_resolve_t *res) ;
extern int ss_resolve_pointo(stralloc *sa,ssexec_t *info,int type, unsigned int where) ;
extern int ss_resolve_src_path(stralloc *sasrc,char const *sv, uid_t owner,char const *directory_forced) ;
extern int ss_resolve_module_path(stralloc *sdir, stralloc *mdir, char const *sv, uid_t owner) ;
extern int ss_resolve_module_path(stralloc *sdir, stralloc *mdir, char const *sv,char const *src_frontend, uid_t owner) ;
extern int ss_resolve_src(stralloc *sasrc, char const *name, char const *src,int *found) ;
extern int ss_resolve_service_isdir(char const *dir, char const *name) ;
extern int ss_resolve_add_uint32(stralloc *sa, uint32_t data) ;
......
......@@ -138,12 +138,11 @@ int parse_service_before(ssexec_t *info,stralloc *parsed_list,stralloc *tree_lis
if (sv_before.cname.itype == TYPE_MODULE)
{
r = parse_module(&sv_before,info,parsed_list,tree_list,svname,nbsv,sasv,force,conf) ;
r = parse_module(&sv_before,info,parsed_list,tree_list,svname,svsrc,nbsv,sasv,force,conf) ;
if (!r) return 0 ;
else if (r == 2)
{
sasv->len = 0 ;
sv_alltype_free(&sv_before) ;
goto add ;
}
......
......@@ -125,7 +125,7 @@ static int rebuild_list(sv_alltype *sv_before,stralloc *list,stralloc *sv_all_ty
* return 2 on already enabled
* @svname do not contents the path of the frontend file*/
int parse_module(sv_alltype *sv_before,ssexec_t *info,stralloc *parsed_list,stralloc *tree_list, char const *svname,unsigned int *nbsv, stralloc *sasv,uint8_t force,uint8_t conf)
int parse_module(sv_alltype *sv_before,ssexec_t *info,stralloc *parsed_list,stralloc *tree_list, char const *svname,char const *src_frontend,unsigned int *nbsv, stralloc *sasv,uint8_t force,uint8_t conf)
{
log_trace("start parse process of module: ",svname) ;
int r, err = 1, insta = -1, svtype = -1, from_ext_insta = 0, already_parsed = 0 ;
......@@ -142,8 +142,8 @@ int parse_module(sv_alltype *sv_before,ssexec_t *info,stralloc *parsed_list,stra
if (insta <= 0)
log_warn_return(LOG_EXIT_ZERO,"invalid module instance name: ",svname);
if (!ss_resolve_module_path(&sdir,&tmp,svname,info->owner)) return 0 ;
if (!ss_resolve_module_path(&sdir,&tmp,svname,src_frontend,info->owner)) return 0 ;
/** check mandatory directories:
* module/module_name, module/module_name/{configure,service,service@} */
if (!check_dir(tmp.s,"")) return 0 ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment