aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/inet_config.erl
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2011-06-21 12:18:15 +0200
committerPatrik Nyblom <[email protected]>2011-06-21 12:18:15 +0200
commitb781506f927672fe22c3fba20e25d39ee64c9594 (patch)
treecba3158ffd2f41e6493342d884382bfb2eaa672e /lib/kernel/src/inet_config.erl
parent22d7ccd9ef7f07baa0ffa648c16f90bfd2c0e342 (diff)
parentb9d8ae5aa52774ed0ce12c9d21ad7f3670c2dca1 (diff)
downloadotp-b781506f927672fe22c3fba20e25d39ee64c9594.tar.gz
otp-b781506f927672fe22c3fba20e25d39ee64c9594.tar.bz2
otp-b781506f927672fe22c3fba20e25d39ee64c9594.zip
Merge branch 'dev' into major
Diffstat (limited to 'lib/kernel/src/inet_config.erl')
-rw-r--r--lib/kernel/src/inet_config.erl52
1 files changed, 2 insertions, 50 deletions
diff --git a/lib/kernel/src/inet_config.erl b/lib/kernel/src/inet_config.erl
index 2458876326..1ddbdcec25 100644
--- a/lib/kernel/src/inet_config.erl
+++ b/lib/kernel/src/inet_config.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -44,26 +44,6 @@
%%
-spec init() -> 'ok'.
init() ->
- OsType = os:type(),
- case OsType of
- {ose,_} ->
- case init:get_argument(loader) of
- {ok,[["ose_inet"]]} ->
- %% port already started by prim_loader
- ok;
- _Other ->
- %% Setup reserved port for ose_inet driver (only OSE)
- case catch erlang:open_port({spawn,"ose_inet"}, [binary]) of
- {'EXIT',Why} ->
- error("can't open port for ose_inet: ~p", [Why]);
- OseInetPort ->
- erlang:display({ose_inet_port,OseInetPort})
- end
- end;
- _ ->
- ok
- end,
-
set_hostname(),
%% Note: In shortnames (or non-distributed) mode we don't need to know
@@ -71,6 +51,7 @@ init() ->
%% the user to provide it (by means of inetrc), so we need to look
%% for it ourselves.
+ OsType = os:type(),
do_load_resolv(OsType, erl_dist_mode()),
case OsType of
@@ -226,35 +207,6 @@ do_load_resolv(vxworks, _) ->
load_resolv(Resolv, resolv)
end;
-do_load_resolv({ose,_Type}, _) ->
- inet_db:set_lookup([file, dns]),
- case os:getenv("NAMESERVER") of
- false ->
- case os:getenv("RESOLVFILE") of
- false ->
- erlang:display('Warning: No NAMESERVER or RESOLVFILE specified!'),
- no_resolv;
- Resolv ->
- load_resolv(Resolv, resolv)
- end;
- Ns ->
- {ok,IP} = inet_parse:address(Ns),
- inet_db:add_rc_list([{nameserver,IP}])
- end,
- case os:getenv("DOMAIN") of
- false ->
- no_domain;
- D ->
- ok = inet_db:add_rc_list([{domain,D}])
- end,
- case os:getenv("HOSTSFILE") of
- false ->
- erlang:display('Warning: No HOSTSFILE specified!'),
- no_hosts_file;
- File ->
- load_hosts(File, ose)
- end;
-
do_load_resolv(_, _) ->
inet_db:set_lookup([native]).