Does lightweight hostname lookup applet exist in BB?

JoSH Lehan krellan at gmail.com
Tue Mar 11 21:09:48 UTC 2008


On Tue, Mar 11, 2008 at 8:59 AM, walter harms <WHarms at bfs.de> wrote:
>  what is getent ? do you mean the getent-function-family ? that is not
>  glibc specific. neither is nslookup Bind specific.

The getent command is often found on Red Hat-based systems.  It is
basically a command-line tool to exercise the getXbyY() and getXent()
families of functions.

The output of nslookup has a lot of BIND-specific configuration file
syntax in it, which is more than what I want.  I'd like something that
can just spit out the resulting IP address or hostname string, like
"host" does.

>  it seems no one is missing it, can you please give a situation where such a
>  function maybe useful ?

Use "host" (or other command) to do a DNS query and resolve the
hostname to an IP address.
Feed that IP address to wget.
Give the true hostname to wget as well, so that it can fill in the
correct "Host:" header when doing the HTTP query.
This lets you grab a URL without needing to install all the full NSS
infrastructure on your local filesystem.

Josh



More information about the busybox mailing list