summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/network/network.pm4
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: $!");