From ac9ff005882f54a9e9e07d7c619d75b252a1e091 Mon Sep 17 00:00:00 2001 From: mihawk Date: Fri, 18 Nov 2016 20:14:17 +0700 Subject: [PATCH] unmerge config --- src/provision/mad_repl.erl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/provision/mad_repl.erl b/src/provision/mad_repl.erl index 06bec51..344b0af 100644 --- a/src/provision/mad_repl.erl +++ b/src/provision/mad_repl.erl @@ -4,7 +4,7 @@ disabled() -> []. system() -> [compiler,syntax_tools,sasl,tools,mnesia,reltool,xmerl,crypto,kernel,stdlib,ssh,eldap, - wx,ssl,runtime_tools,public_key,observer,inets,asn1,et,eunit,hipe,os_mon,parsetools,odbc]. + wx,ssl,runtime_tools,public_key,observer,inets,asn1,et,eunit,hipe,os_mon,parsetools,odbc,n2o]. local_app() -> case filename:basename(filelib:wildcard("ebin/*.app"),".app") of @@ -59,9 +59,15 @@ load(true,A,Acc,Config) -> % and start application using tuple argument in app controller load(_,A,Acc,Config) -> - {application,Name,Map} = load_config(A), - NewEnv = merge(Config,Map,Name), - acc_start({application,Name,set_value(env,1,Map,{env,NewEnv})},Acc). + load_config(Config,[]), + acc_start(A,Acc). +% load(_,A,Acc,Config) -> +% {application,Name,Map} = load_config(A), +% io:format(">>> ~p => Map ~p~n",[Name, Map]), +% NewEnv = merge(Config,Map,Name), +% io:format(">>> ~p => Config ~p~n",[Name,Config]), +% io:format(">>> ~p => NewEnv ~p~n",[Name,NewEnv]), +% acc_start({application,Name,set_value(env,1,Map,{env,NewEnv})},Acc). merge(Config,Map,Name) -> lists:foldl(fun({Name,E},Acc2) -> @@ -102,6 +108,7 @@ sh(Params) -> Driver:start(), wait(3000), rewrite_leaders(O,whereis(user)) end, + mad:info(">>>>>> mad params ~p~n",[Params]), load_apps(Params,Config,[]), case Params of ["applist"] -> skip;