anchor.diff:                      maybe_cleanup_old_buckets(),
                       ns_config:set(rest, [{port, PortInt}]),
                       ns_config_auth:set_credentials(admin, U, P),
  +                    case ns_config:search(uuid) of
  +                        false ->
  +                            Uuid = couch_uuids:random(),
  +                            ns_config:set(uuid, Uuid);
  +                        _ ->
  +                            ok
  +                    end,
                       ns_audit:password_change(Req, U, admin),
   
                       %% NOTE: this to avoid admin user name to be equal
  
positive.code:     end,
      exit(normal).
  
  % Returns an UUID if it is already in the ns_config and generates
  % a new one otherwise.
  get_uuid() ->
      case ns_config:search(uuid) of
          false ->
              Uuid = couch_uuids:random(),
              ns_config:set(uuid, Uuid),
              Uuid;
          {value, Uuid2} ->
              Uuid2
      end.
  
  
  handle_versions(Req) ->
      reply_json(Req, {struct, menelaus_web_cache:versions_response()}).
  
negative.code:         true ->
              ReqUUID = list_to_binary(ReqUUID0),
              UUID = get_uuid(),
              %%
              %% get_uuid() will return empty UUID if the system is not
              %% provisioned yet. If ReqUUID is also empty then we let
              %% the request go through. But, if ReqUUID is not-empty
              %% and UUID is empty then we will retrun 404 error.
              %%
              case ReqUUID =:= UUID of
                  true ->
                      erlang:apply(F, Args ++ [Req]);
  