From 5b3fd663ed04f9c6fa87dac755df6c7e0b8520a9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 14 Sep 2010 11:58:55 +0000 Subject: [PATCH] * Don't set hostname to "", dhclient no longer needs it. svn path=/nixos/trunk/; revision=23783 --- modules/tasks/network-interfaces.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/tasks/network-interfaces.nix b/modules/tasks/network-interfaces.nix index 2e1514a82cfd..562a945d832a 100644 --- a/modules/tasks/network-interfaces.nix +++ b/modules/tasks/network-interfaces.nix @@ -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 - ''); + ''; };