about summary refs log tree commit diff
path: root/pkgs/tools/networking/dhcp/set-hostname.patch
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2011-04-01 15:04:20 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2011-04-01 15:04:20 +0000
commit601aeb1aa8ec79db7dbf027957a0e0f8c1d91830 (patch)
tree058b530fc837f0dfac13f3a57474659f98d45ed9 /pkgs/tools/networking/dhcp/set-hostname.patch
parent1f01ba2ce4b901dbeaac1f116a29f01a66233ff2 (diff)
* Make sure that dhclient properly sets the hostname after reboots.
svn path=/nixpkgs/branches/modular-python/; revision=26659
Diffstat (limited to 'pkgs/tools/networking/dhcp/set-hostname.patch')
-rw-r--r--pkgs/tools/networking/dhcp/set-hostname.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/tools/networking/dhcp/set-hostname.patch b/pkgs/tools/networking/dhcp/set-hostname.patch
new file mode 100644
index 0000000000000..495a8a124be39
--- /dev/null
+++ b/pkgs/tools/networking/dhcp/set-hostname.patch
@@ -0,0 +1,14 @@
+diff -ru -x '*~' dhcp-4.1.2-P1-orig//client/scripts/linux dhcp-4.1.2-P1//client/scripts/linux
+--- dhcp-4.1.2-P1-orig//client/scripts/linux	2010-09-15 00:49:48.000000000 +0200
++++ dhcp-4.1.2-P1//client/scripts/linux	2011-04-01 16:08:10.984372269 +0200
+@@ -133,9 +133,7 @@
+      [ x$current_hostname = "x(none)" ] || \
+      [ x$current_hostname = xlocalhost ] || \
+      [ x$current_hostname = x$old_host_name ]; then
+-    if [ x$new_host_name != x$old_host_name ]; then
+-      hostname "$new_host_name"
+-    fi
++    hostname "$new_host_name"
+   fi
+     
+   if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \