The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to do host lookups
2016-06-01, 14:50
Post: #1
how to do host lookups
Hi,

I am using a particular open source virtualisation platform, which has ipxe as the PXE implementation. In our kickstart menu (which is php), we need to do a hostname lookup to choose the appropriate local server as there are different boot servers in different global locations. Currently, on our other closed-source virtualisation platforms it is done via 'nslookup' when pxebooting. The nslookup command has not been compiled into ipxe on the open source virtualisation platform. I have requested that they add it. I could replace their ipxe rom with my own, but I thought I'd explore a different way of doing this. I've tried:

<?php $ip = gethostbyname('wds'); ?>
set wds <?php echo $ip; ?>
set net0/next-server ${wds}

However, this does not work. The lookup is successful when I use the 'show' command to print it, but it doesn't seem to get read into the variable properly. Any ideas? Or is there another way of getting this functionality?

Thanks,

Cam
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
how to do host lookups - iucounu9 - 2016-06-01 14:50
RE: how to do host lookups - mcb30 - 2016-06-03, 16:59



User(s) browsing this thread: 1 Guest(s)