anchor.diff:              {next_state, stopped, State}
       end;
   
  +stopped(check, State = #state{uuid = UUID, type = jail}) ->
  +    eval_check(check_jail(UUID), State);
  +
   stopped(check, State = #state{uuid = UUID}) ->
  -    case check_state(UUID) of
  -        not_found ->
  -            lager:info("[zlogin:~s] shutting down since check failed.", [UUID]),
  -            {stop, normal, State};
  -        _ ->
  -            check(),
  -            {next_state, stopped, State}
  -    end;
  -
  +    eval_check(check_state(UUID), State);
   
   stopped({send, Data}, State = #state{uuid = UUID}) ->
       lager:info("[~s] ! < ~s", [UUID, Data]),
  
positive.code:         _ ->
              ok
      end.
  
  %% init_console(State = #state{uuid = UUID, zone_type = docker}) ->
  %%     case State#state.console of
  %%         undefined ->
  %%             [{_, Name, _, _, _, _}] = chunter_zone:get_raw(State#state.uuid),
  %%             %%Console = code:priv_dir(chunter) ++
  %%             %% "/runpty /usr/sbin/zlogin -I " ++ binary_to_list(Name),
  %%             Console = "/usr/sbin/zlogin -Q -I " ++ binary_to_list(Name),
  %%             %% This is a bit of a hack
  %%             %% https://github.com/joyent/sdc-cn-agent/blob/
  %%             %% 4efd72f2dda2a6daceb51a0cb84d0b06d0bc011d/lib/
  %%             %% update-wait-flag.js
  %%             %% explains why we need it
  %%             ConsolePort = open_port({spawn, Console},
  %%                                     [use_stdio, binary, stderr_to_stdout]),
  %%             %% We make sure that the console actually survuves for 200 ms to
  %%             %% prevent the attach to 'succeed' but not succeed
  %%             receive
  %%                 {'EXIT', ConsolePort, _PosixCode} ->
  %%                     State
  %%             after
  %%                 200 ->
  %%                     chunter_vmadm:update(UUID,
  %%                                          [{<<"remove_internal_metadata">>,
  %%                                            [<<"docker:wait_for_attach">>]}]),
  %%                     State#state{console = ConsolePort}
  %%             end;
  %%         _ ->
  %%             State
  %%     end;
  
  %% init_console(State) ->
  %%     case State#state.console of
  %%         undefined ->
  %%             [{_, Name, _, _, _, _}] = chunter_zone:get_raw(State#state.uuid),
  %%             Console = code:priv_dir(chunter) ++
  %%             "/runpty /usr/sbin/zlogin -Q " ++ binary_to_list(Name),
  %%             ConsolePort = open_port({spawn, Console}, [binary]),
  %%             State#state{console = ConsolePort};
  %%         _ ->
  %%             State
  %%     end.
  
  
  relay(Msg, #state{listeners = Ls}) ->
      [L ! {data, Msg} || {_, L} <- Ls].
  
negative.code: 
  connected(_, State) ->
      {next_state, connected, State}.
  
  eval_check(not_found, State = #state{ uuid = UUID}) ->
      lager:info("[zlogin:~s] shutting down since check failed.", [UUID]),
      {stop, normal, State};
  eval_check(_, State) ->
      check(),
      {next_state, stopped, State}.
  
  %%--------------------------------------------------------------------
  %% @private
  