Skip to content

Commit

Permalink
[PATCH 1/3] Do not override the specific chroot option
Browse files Browse the repository at this point in the history
  • Loading branch information
ates committed Feb 8, 2013
1 parent 3661fc8 commit 41bb915
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/epcap.erl
Expand Up @@ -58,7 +58,12 @@ stop(Pid) ->

init([Pid, Options]) ->
process_flag(trap_exit, true),
Chroot = chroot_path(),
Chroot = case proplists:get_value(chroot, Options) of
undefined ->
filename:join([basedir(), "tmp"]);
Value ->
Value
end,
ok = filelib:ensure_dir(filename:join(Chroot, "dummy")),
Timeout = case os:type() of
{unix, linux} -> 0;
Expand Down Expand Up @@ -154,10 +159,6 @@ basedir() ->
progname() ->
filename:join([basedir(), ?MODULE]).

-spec chroot_path() -> string().
chroot_path() ->
filename:join([basedir(), "tmp"]).

-spec pfring([proplists:property()]) -> string().
pfring(Options) ->
case proplists:get_value(cluster_id, Options) of
Expand Down

0 comments on commit 41bb915

Please sign in to comment.