Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hostname provided by DHCP #156

Open
mrichar1 opened this issue May 30, 2018 · 2 comments
Open

Use hostname provided by DHCP #156

mrichar1 opened this issue May 30, 2018 · 2 comments

Comments

@mrichar1
Copy link
Contributor

Hi,

I was wondering if it might be possible to have the option to use a hostname provided by DHCP if one is provided, rather than having to hard-code it?

I've had a look at udhcpc and it seems to set the variable $hostname if one is provided by DHCP, which can then be used via the default.script it calls. If there was some way to flag to the installer to use this variable, that would be great!

Happy to dig into the code and see how feasible this is if you think it's a good idea?

@kpfleming
Copy link
Contributor

Certainly seems like a reasonable thing to do, behind an opt-in configuration variable.

@mrichar1
Copy link
Contributor Author

So having dug a bit more there are actually quite a few variables which are offered by DHCP which might be useful to use to dynamically override those in installer-config.txt, including (but possibly not limited to):

  • hostname
  • domain
  • ntp/time server

( https://github.com/jgunthorpe/busybox/blob/master/networking/udhcp/README.udhcpc)

I'm now wondering if instead of a specific setting for each one, it might be better to have an option that takes a list of variables to source from DHCP? Something like:

dhcp_options=hostname,domain,timeserver

And then have a mapping of dhcp options to netinst options to override.

@FooDeas FooDeas added this to the v2.3.0 milestone Jun 23, 2018
@FooDeas FooDeas removed this from the v4.5.0 milestone Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants