aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch')
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch
new file mode 100644
index 000000000..9a6e7b969
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-hostname.patch
@@ -0,0 +1,16 @@
+--- client/scripts/linux
++++ client/scripts/linux
+@@ -138,10 +138,12 @@
+ [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
+ current_hostname=`hostname`
+ if [ x$current_hostname = x ] || \
++ [ x$current_hostname = "x(none)" ] || \
++ [ x$current_hostname = xlocalhost ] || \
+ [ x$current_hostname = x$old_host_name ]; then
+ if [ x$current_hostname = x ] || \
+ [ x$new_host_name != x$old_host_name ]; then
+- hostname $new_host_name
++ hostname "$new_host_name"
+ fi
+ fi
+