diff -u dhcp3-3.0.4/debian/dhclient.conf dhcp3-3.0.4/debian/dhclient.conf
--- dhcp3-3.0.4/debian/dhclient.conf
+++ dhcp3-3.0.4/debian/dhclient.conf
@@ -11,7 +11,7 @@
 #	few changes must be made to this file, if any.
 #
 
-#send host-name "andare.fugue.com";
+send host-name "<hostname>";
 #send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
 #send dhcp-lease-time 3600;
 #supersede domain-name "fugue.com home.vix.com";
diff -u dhcp3-3.0.4/debian/changelog dhcp3-3.0.4/debian/changelog
--- dhcp3-3.0.4/debian/changelog
+++ dhcp3-3.0.4/debian/changelog
@@ -1,3 +1,16 @@
+dhcp3 (3.0.4-12ubuntu2) feisty; urgency=low
+
+  * Add debian/patches/dynamic-hostname.dpatch:
+     - Add support for a new string type 'h' which behaves like 't' except
+       that '<hostname>' is changed to the current hostname.
+     - Change 'host-name' DHCP option type from 't' to 'h'.
+     - Based on a patch from Nathan O'Sullivan, thank you!
+  * debian/dhclient.conf: Enable send-hostname by default (value '<hostname>',
+    which our shiny new patch from above will translate to the actual
+    hostname). Closes: LP#10239 and two handful of duplicates.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Wed,  7 Feb 2007 11:47:20 +0100
+
 dhcp3 (3.0.4-12ubuntu1) feisty; urgency=low
 
   * Merge from debian unstable, remaining changes:
diff -u dhcp3-3.0.4/debian/patches/00list dhcp3-3.0.4/debian/patches/00list
--- dhcp3-3.0.4/debian/patches/00list
+++ dhcp3-3.0.4/debian/patches/00list
@@ -26,0 +27 @@
+dynamic-hostname
only in patch2:
unchanged:
--- dhcp3-3.0.4.orig/debian/patches/dynamic-hostname.dpatch
+++ dhcp3-3.0.4/debian/patches/dynamic-hostname.dpatch
@@ -0,0 +1,92 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## dynamic-hostname.dpatch by  <martin.pitt@ubuntu.com>
+##
+## DP: Add support for a new string type 'h' which behaves like 't' except that
+## DP: '<hostname>' is changed to the current hostname.
+
+@DPATCH@
+diff -urNad dhcp3-3.0.4~/common/options.c dhcp3-3.0.4/common/options.c
+--- dhcp3-3.0.4~/common/options.c	2006-02-22 23:43:27.000000000 +0100
++++ dhcp3-3.0.4/common/options.c	2007-02-07 12:33:52.000000000 +0100
+@@ -1060,6 +1060,7 @@
+ 		switch (*p++) {
+ 		    case 'd':
+ 		    case 't':
++		    case 'h':
+ 			return 1;
+ 
+ 			/* These symbols are arbitrary, not fixed or
+diff -urNad dhcp3-3.0.4~/common/parse.c dhcp3-3.0.4/common/parse.c
+--- dhcp3-3.0.4~/common/parse.c	2006-02-22 23:43:27.000000000 +0100
++++ dhcp3-3.0.4/common/parse.c	2007-02-07 12:33:52.000000000 +0100
+@@ -4300,6 +4300,23 @@
+ 	return 1;
+ }
+ 
++int make_possible_hostname(val, len)
++       char** val;
++       unsigned* len;
++{
++       static char localhostname[HOST_NAME_MAX];
++
++       if (!strcmp(*val, "<hostname>")) {
++               if (gethostname (localhostname, HOST_NAME_MAX))
++                       return 0;
++               localhostname [HOST_NAME_MAX-1] = 0;
++               *val = localhostname;
++               *len = strlen(localhostname);
++       }
++       return 1;
++}
++
++
+ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
+ 	struct expression **rv;
+ 	struct parse *cfile;
+@@ -4383,6 +4400,7 @@
+ 		goto make_string;
+ 
+ 	      case 't': /* Text string... */
++	      case 'h': /* Text string with <hostname> magic... */
+ 		token = next_token (&val, &len, cfile);
+ 		if (token != STRING && !is_identifier (token)) {
+ 			if ((*fmt) [1] != 'o') {
+@@ -4392,6 +4410,9 @@
+ 			}
+ 			return 0;
+ 		}
++                if (**fmt == 'h' && !make_possible_hostname (&val, &len))
++                        parse_warn (cfile, "resolving <hostname> failed");
++
+ 	      make_string:
+ 		if (!make_const_data (&t, (const unsigned char *)val,
+ 				      len, 1, 1, MDL))
+@@ -4578,6 +4599,7 @@
+ 				break;
+ 					
+ 			      case 't': /* Text string... */
++			      case 'h': /* Text string with <hostname> magic... */
+ 				token = next_token (&val,
+ 						    &len, cfile);
+ 				if (token != STRING) {
+diff -urNad dhcp3-3.0.4~/common/tables.c dhcp3-3.0.4/common/tables.c
+--- dhcp3-3.0.4~/common/tables.c	2006-02-22 23:43:27.000000000 +0100
++++ dhcp3-3.0.4/common/tables.c	2007-02-07 12:34:30.000000000 +0100
+@@ -58,6 +58,8 @@
+    b - 8-bit signed integer
+    B - 8-bit unsigned integer
+    t - ASCII text
++   h - same as t, but if the ASCII string is "<hostname>", option is set
++       to the value returned by gethostname(2)
+    T - Lease Time, 32-bit unsigned integer implying a number of seconds from
+        some event.  The special all-ones value means 'infinite'.  May either
+        be printed as a decimal, eg, "3600", or as this name, eg, "infinite".
+@@ -105,7 +107,7 @@
+ 	{ "lpr-servers", "IA",				&dhcp_universe, 9 },
+ 	{ "impress-servers", "IA",			&dhcp_universe, 10 },
+ 	{ "resource-location-servers", "IA",		&dhcp_universe, 11 },
+-	{ "host-name", "t",				&dhcp_universe, 12 },
++	{ "host-name", "h",				&dhcp_universe, 12 },
+ 	{ "boot-size", "S",				&dhcp_universe, 13 },
+ 	{ "merit-dump", "t",				&dhcp_universe, 14 },
+ 	{ "domain-name", "t",				&dhcp_universe, 15 },
