summary refs log tree commit diff
path: root/pkgs/tools/networking/dhcp/set-hostname.patch
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-01-08 10:33:59 -0600
committerWill Dietz <w@wdtz.org>2018-03-01 08:40:30 -0600
commit559c79d7b7810308762aa525e05dcfb1115d929c (patch)
tree6b35c10e84b0a8c9f6e92fe0db2e57a74732f44e /pkgs/tools/networking/dhcp/set-hostname.patch
parentb8b2225f6b2f9416b18906e28b294ed8b099095a (diff)
downloadnixpkgs-559c79d7b7810308762aa525e05dcfb1115d929c.tar
nixpkgs-559c79d7b7810308762aa525e05dcfb1115d929c.tar.gz
nixpkgs-559c79d7b7810308762aa525e05dcfb1115d929c.tar.bz2
nixpkgs-559c79d7b7810308762aa525e05dcfb1115d929c.tar.lz
nixpkgs-559c79d7b7810308762aa525e05dcfb1115d929c.tar.xz
nixpkgs-559c79d7b7810308762aa525e05dcfb1115d929c.tar.zst
nixpkgs-559c79d7b7810308762aa525e05dcfb1115d929c.zip
dhcp: 4.3.4 -> 4.3.6
Diffstat (limited to 'pkgs/tools/networking/dhcp/set-hostname.patch')
-rw-r--r--pkgs/tools/networking/dhcp/set-hostname.patch24
1 files changed, 11 insertions, 13 deletions
diff --git a/pkgs/tools/networking/dhcp/set-hostname.patch b/pkgs/tools/networking/dhcp/set-hostname.patch
index 495a8a124be..7aa9d081451 100644
--- a/pkgs/tools/networking/dhcp/set-hostname.patch
+++ b/pkgs/tools/networking/dhcp/set-hostname.patch
@@ -1,14 +1,12 @@
-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
+--- a/client/scripts/linux	2010-09-15 00:49:48.000000000 +0200
++++ b/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 ] && \
+            [ "$current_hostname" = '(none)' ] ||
+            [ "$current_hostname" = 'localhost' ] ||
+            [ "$current_hostname" = "$old_host_name" ]; then
+-           if [ "$new_host_name" != "$old_host_name" ]; then
+-               hostname "$new_host_name"
+-           fi
++           hostname "$new_host_name"
+         fi
+     fi