[pve-devel] [PATCH installer 0/5] use hostname from DHCP lease if available

Christoph Heiss c.heiss at proxmox.com
Fri Oct 20 11:46:43 CEST 2023

DHCP servers can set option 12 ("host-name") for client leases [0],
telling them about their hostname. It's very much non-invasive and falls
back to the default values as done currently.

This came up while talking to Aaron, which he noticed (esp. during
trainings) that this would be a very useful feature too have.

I have tested this with the "host-name" entry set and unset, as well as
any combinations of that with the domain name being set or unset.

[0] https://datatracker.ietf.org/doc/html/rfc2132#section-3.14

Christoph Heiss (5):
  net: move hostname/fqdn regexes into common code
  run env: retrieve and store hostname from DHCP lease if available
  proxinstall: use hostname from run env if available
  tui: use hostname from run env if available
  tui: add some tests for `NetworkInfo` -> `NetworkOptions` conversion

 Proxmox/Install/RunEnv.pm            |   4 +
 Proxmox/Sys/Net.pm                   |  28 ++++++
 proxinstall                          |  15 +--
 proxmox-tui-installer/src/options.rs | 132 +++++++++++++++++++++++++--
 proxmox-tui-installer/src/setup.rs   |   3 +
 proxmox-tui-installer/src/utils.rs   |   2 +-
 6 files changed, 169 insertions(+), 15 deletions(-)


More information about the pve-devel mailing list