On Sun, Dec 12, 2010 at 01:12:19AM +0100, Floris Bos wrote: > On Saturday, December 11, 2010 07:31:48 am Christian PERRIER wrote: > > Correct. Apparently, though, that behaviour didn't bother anybody > > enough to look at current netcfg code and propose the needed patch > > Fair enough. > > Attached a patch that introduces a new netcfg/hostname option that -if > set- takes precedence over the RDNS/DHCP hostname magic.
Floris, I think I'm going to name my first child after you. In the meantime, to honour your awesomeness, here's a patch for the manual to go along with your patch. - Matt
diff --git a/manual/en/appendix/preseed.xml b/manual/en/appendix/preseed.xml index 7e9eff1..19a7da7 100644 --- a/manual/en/appendix/preseed.xml +++ b/manual/en/appendix/preseed.xml @@ -864,12 +864,18 @@ d-i netcfg/choose_interface select auto #d-i netcfg/get_gateway string 192.168.1.1 #d-i netcfg/confirm_static boolean true -# Any hostname and domain names assigned from dhcp take precedence over -# values set here. However, setting the values still prevents the questions -# from being shown, even if values come from dhcp. +# Setting these values prevents the associated questions from being asked, +# however if DHCP or reverse DNS lookups succeed, those results will be used +# in favour of these options. If you truly want to preseed a hostname, see +# netcfg/hostname (below) d-i netcfg/get_hostname string unassigned-hostname d-i netcfg/get_domain string unassigned-domain +# If you want netcfg to definitely use your preseeded hostname, rather than +# trying to look it up via DHCP or DNS, you want to set this option. It +# can either be a bare hostname, or an FQDN. +d-i netcfg/hostname string unassigned-hostname.unassigned-domain + # Disable that annoying WEP key dialog. d-i netcfg/wireless_wep string # The wacky dhcp hostname that some ISPs use as a password of sorts.