Author: eelco
Date: Tue Sep 14 11:58:55 2010
New Revision: 23783
URL: https://svn.nixos.org/websvn/nix/?rev=23783&sc=1
Log:
* Don't set hostname to "", dhclient no longer needs it.
Modified:
nixos/trunk/modules/tasks/network-interfaces.nix
Modified: nixos/trunk/modules/tasks/network-interfaces.nix
==============================================================================
--- nixos/trunk/modules/tasks/network-interfaces.nix Tue Sep 14 11:58:06
2010 (r23782)
+++ nixos/trunk/modules/tasks/network-interfaces.nix Tue Sep 14 11:58:55
2010 (r23783)
@@ -211,14 +211,9 @@
# 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
- '');
+ '';
};
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits