diff --git a/src/ezic.app.src b/src/ezic.app.src index 07ce430..4167a6f 100644 --- a/src/ezic.app.src +++ b/src/ezic.app.src @@ -6,6 +6,6 @@ kernel, stdlib ]}, - {mod, {ezic_app, ezic_db_ets}}, - {env, [{db_dir, "db"}, {tzdata_dir, "priv/tzdata"}]} + {mod, {ezic_app, []}}, + {env, [{db_mod, ezic_db_ets}, {db_dir, "db"}, {tzdata_dir, "priv/tzdata"}]} ]}. \ No newline at end of file diff --git a/src/ezic_app.erl b/src/ezic_app.erl index 1dde13f..9905d78 100644 --- a/src/ezic_app.erl +++ b/src/ezic_app.erl @@ -25,8 +25,14 @@ %% OTP design principles as a supervision tree, this means starting the %% top supervisor of the tree. %%-------------------------------------------------------------------- -start(_Type, StartArgs) -> - case ezic_sup:start_link(StartArgs) of + +%% TODO: remove by 2013.09.07 (6 months from today), to allow time for +%% the transition +start(_Type, [_]) -> + erlang:error("Failed transition to v0.3.0: See Pull Request: https://github.com/drfloob/ezic/pull/15"); +start(_Type, _StartArgs) -> + {ok, DbMod} = application:get_env(db_mod), + case ezic_sup:start_link(DbMod) of {ok, Pid} -> {ok, Pid}; Error ->