[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#343269: hostname/domain name preseeding is quite broken

Package: netcfg
Severity: normal

The support for preseeding the hostname and domain name is very broken in
netcfg. The debconf questions netcfg/get_hostname and netcfg/get_domain are
badly named (should be netcfg/hostname and netcfg/domain). netcfg sets
these to values that it finds in dns or dhcp with no regard to any
existing preseeded value, so you can't override the dns or dhcp with
preseeding, which should be possible for installing on a broken network.

The installation manual puts the best face it can on netcfg's behavior
with this:

# 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.
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain

I think that netcfg's use of these variables needs to be rewritten, to
make it 

a) take care to not trample over existing settings
b) if there is no existing value, use dhcp/dns to get a good default
c) if the user enters something wrong or goes back, unset the value to
   avoid a) above preventing b) from working when the question is asked

Since it would change the behavior of the two questions to do this, and
require preseeding changes, this would be a good chance to rename them

see shy jo

Attachment: signature.asc
Description: Digital signature

Reply to: