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.
if tftp-addr is set to eg 0.0.0.0:10669 (to avoid specifying IP address), then one is forced to specify IP address in dhcp-tftp-ip just to specify the port
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`
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
tftp-addr
is unset, it will auto-detect IP and default to port 69. https://github.com/tinkerbell/smee/blob/main/cmd/smee/flag.go#L90dhcp-tftp-ip
behaves the same; thus auto-detected-IP +:69
https://github.com/tinkerbell/smee/blob/main/cmd/smee/flag.go#L120tftp-addr
is set to eg0.0.0.0:10669
(to avoid specifying IP address), then one is forced to specify IP address indhcp-tftp-ip
just to specify the portHTTP 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 involving
http-addrto
dhcp-http-ipxe-binary-url,
dhcp-http-ipxe-script-url`