anchor.diff:              {next_state, connected, State1}
       end;
   
  +stopped(check, State = #state{uuid = UUID}) ->
  +    case fifo_cmd:run("/usr/sbin/zoneadm", [{z, UUID}, "list"]) of
  +        {ok, _} ->
  +            check(),
  +            {next_state, stopped, State};
  +        _ ->
  +            lager:info("[zlogin:~s] shutting down since check failed.", [UUID]),
  +            {stop, normal, State}
  +    end;
  +
  +
   stopped({send, Data}, State = #state{uuid = UUID}) ->
       lager:info("[~s] ! < ~s", [UUID, Data]),
       {next_state, stopped, State}.
  
positive.code: %% @end
  %%--------------------------------------------------------------------
  init([UUID, kvm]) ->
      {ok, kvm, #state{uuid = UUID}, 0};
  
  init([UUID, docker]) ->
      lager:info("[zlogin:~s] Starting docker zlogin.", [UUID]),
      tick(),
      process_flag(trap_exit, true),
      {ok, stopped, #state{uuid = UUID, type = docker}};
  
  init([UUID, Type]) ->
      tick(),
      process_flag(trap_exit, true),
      {ok, stopped, #state{uuid = UUID, type = Type}}.
  
  
negative.code: tick() ->
      gen_fsm:send_event_after(1000, tick).
  
  check() ->
      gen_fsm:send_event_after(60000, check).
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  