tinkerbell / smee

DHCP and iPXE Server
https://tinkerbell.org
Apache License 2.0
245 stars 81 forks source link

Default command-line option values depend on other command-line options (ref `detectPublicIPv4`) #475

Closed rpardini closed 6 days ago

rpardini commented 1 week ago

Default command-line option values depend on other command-line options (ref detectPublicIPv4)

The main issue here is that when running Smee directly in the host network, I'd like to avoid specifying any IP addresses at all, while being able to specify ports.

The way this is implemented (in flags.go) doesn't allow us to default DHCP/ipxe script to the listened-to ports.

TFTP listen port vs DHCP value
HTTP port

still working on this part, but principle is the same; I couldn't make sense of the :80, :8080 and ` (defaulting to 80) defaults used involvinghttp-addrtodhcp-http-ipxe-binary-url,dhcp-http-ipxe-script-url`

rpardini commented 1 week ago

I'm unsure there's provisions for handling this in https://github.com/peterbourgon/ff ...

rpardini commented 3 days ago

Solution tested & works perfectly. Thanks!