#1466 PR merged
: Resolve $PXE_TFTP_IP to IP if hostname or FQDN are used¶
Labels: enhancement
, fixed / solved / done
schabrolles opened issue at 2017-09-01 09:46:¶
Grub2 net_default_server_opt
variable must be a real IP not a hostname
or fqdn.
=> if a user do not specify PXE_TFTP_IP
, this one will be "guess"
from the "PXE_TFTP_URL".
But we need to be sure it is a real numeric IP. if not we need to try to
resolve the name to IP.
Creation of two new functions in network-functions.sh
- create is_ip() function
- create get_ip_from_fqdn() function
schlomo commented at 2017-09-01 12:44:¶
For my personal taste way too much code for little benefit. What does it
protect against? Are you worried that in some case getent
will not
start the output from an IP? If we don't find an example of that now
then I strongly suspect that this tool will always return an IP as the
first word - or nothing.
Personally I'd rather start with simple code and make it more complex when we know the problem.
schabrolles commented at 2017-09-01 13:06:¶
@schlomo changes applied
schabrolles commented at 2017-09-01 15:16:¶
@schlomo done and tested against SLES12
schabrolles commented at 2017-09-04 18:14:¶
@schlomo, I think we are now ready to merge this one.
schlomo commented at 2017-09-04 18:29:¶
👍 please merge
[Export of Github issue for rear/rear.]