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

Bug#984846: netcfg: Default hostname hardcoded in netcfg-common



Hello,

Arnaud Rebillout <arnaudr@kali.org> (2021-03-09):
> Dear Maintainer,
> 
> the default hostname "debian" is hardcoded in two places in the file
> netcfg-common.c:
> 
> https://salsa.debian.org/installer-team/netcfg/-/blob/master/netcfg-common.c#L1043
> https://salsa.debian.org/installer-team/netcfg/-/blob/master/netcfg-common.c#L1069
> 
> This was reported in the Kali Linux bugtracker [1].
> 
> For Kali, we set the default hostname to 'kali' in the file
> 'debian/netcfg-common.templates', key 'netcfg/get_hostname', so that
> the installer proposes it as the default hostname. It works well,
> however one of our user noticed that if they enter an invalid
> hostname, the default hostname is set back to 'debian' (since it's
> hardcoded in netcfg-common.c).
> 
> It would be nice if instead it would default to the value that is set
> in 'netcfg/get_hostname'. However I'm nost sure how to achieve that,
> as I'm not familiar with the netcfg code at all, and it's not clear if
> we can still get this value at this moment in the code, or if it has
> been overwritten by the user's input.

My first reaction was “we could make that configurable on a per-vendor
fashion” (e.g. via debian/rules) but reading you are already patching
debian/netcfg-common.templates, why aren't you patching the two harcoded
locations in the first place?

That would mean updating a patch on your side, without changing any code
or logic?


Cheers,
-- 
Cyril Brulebois (kibi@debian.org)            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant

Attachment: signature.asc
Description: PGP signature


Reply to: