* Don't set hostname to "", dhclient no longer needs it.

svn path=/nixos/trunk/; revision=23783
This commit is contained in:
Eelco Dolstra 2010-09-14 11:58:55 +00:00
parent 071b192c9d
commit 5b3fd663ed

View File

@ -211,14 +211,9 @@ in
# it's not configured in the NixOS configuration, since it may
# have been set by dhclient in the meantime.
system.activationScripts.hostname =
(if config.networking.hostName != "" then ''
optionalString (config.networking.hostName != "") ''
hostname "${config.networking.hostName}"
'' else ''
# dhclient won't do anything if the hostname isn't empty.
if test "$(hostname)" = "(none)"; then
hostname ""
fi
'');
'';
};