anchor.diff:  -include_lib("logplex.hrl").
   
   start_link() ->
  -    BootFromDisk = setup(),
  +    setup(),
       {ok, Pid} = redo:start_link(config, redo_opts()),
  -    boot_nsync(not BootFromDisk),
  +    os:getenv("NSYNC") =/= "0" andalso boot_nsync(),
       {ok, Pid}.
   
   setup() ->
       create_ets_tables(),
  -    NumObjs = open_dets_tables(),
  +    open_dets_tables(),
       populate_ets([channels, tokens, drains]),
  -    spawn_link(fun sync_dets/0),
  -    NumObjs > 0.
  +    spawn_link(fun sync_dets/0).
   
   create_ets_tables() ->
       ets:new(channels, [named_table, public, set, {keypos, 2}]),
  
positive.code:     end,
      RedisOpts1 = proplists:delete(ip, RedisOpts),
      RedisOpts2 = [{ip, Ip} | RedisOpts1],
      [{callback, {nsync_callback, handle, []}}, {block, Block}, {timeout, 20 * 60 * 1000} | RedisOpts2].
  
  redo_opts() ->
      case os:getenv("LOGPLEX_CONFIG_REDIS_URL") of
  
negative.code:     {ok, _} = dets:open_file(channels, [{keypos, 2}, {type, set}]),
      {ok, _} = dets:open_file(tokens,   [{keypos, 2}, {type, set}]),
      {ok, _} = dets:open_file(drains,   [{keypos, 2}, {type, set}]),
      ok.
  
  populate_ets([]) -> ok;
  
  