diff options
author | Olav Vitters <olav@vitters.nl> | 2013-10-15 23:01:21 +0200 |
---|---|---|
committer | Olav Vitters <olav@vitters.nl> | 2013-10-15 23:01:21 +0200 |
commit | 619387ddae0b76970fc78b7928d3b97fbfc04193 (patch) | |
tree | 0b9bfc7485692bf8ea211cba399eb1d704eeb6c1 /lib | |
parent | ef7ab7f84df1d827d91325f7c1aaeef081ce6648 (diff) | |
download | drakx-net-619387ddae0b76970fc78b7928d3b97fbfc04193.tar drakx-net-619387ddae0b76970fc78b7928d3b97fbfc04193.tar.gz drakx-net-619387ddae0b76970fc78b7928d3b97fbfc04193.tar.bz2 drakx-net-619387ddae0b76970fc78b7928d3b97fbfc04193.tar.xz drakx-net-619387ddae0b76970fc78b7928d3b97fbfc04193.zip |
Do not add 127.0.0.1 entires to /etc/hosts as this is handled by nss-myhostname
Diffstat (limited to 'lib')
-rw-r--r-- | lib/network/network.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/network/network.pm b/lib/network/network.pm index e62ea5e..4030b76 100644 --- a/lib/network/network.pm +++ b/lib/network/network.pm @@ -291,14 +291,12 @@ sub addDefaultRoute { } sub write_hostname { + #- ovitters: adding 127.0.0.1 to /etc/hosts is obsolete as nss-myhostname handles it my ($hostname) = @_; addVarsInSh($::prefix . $network_file, { HOSTNAME => $hostname }, qw(HOSTNAME)); output($::prefix . $hostname_file, $hostname || "localhost"); - add2hosts("localhost", "127.0.0.1"); - add2hosts($hostname, "127.0.0.1") if $hostname; - unless ($::isInstall) { my $rc = syscall_("sethostname", $hostname, length $hostname); log::explanations($rc ? "set sethostname to $hostname" : "sethostname failed: $!"); |