Re: Getting hostname
On 04-May-03, 12:34 (CDT), Holger Kubiak <debian@holger-kubiak.de> wrote:
> I want to package a tool. In a shell-script I need access to a hostname
> belonging to a given IP. If the package host is installed I get:
>
> holger@myhost:~$ host 193.99.144.71
> Name: www.heise.de
> Address: 193.99.144.71
>
> If the package bind9-host is installed I get:
>
> holger@myhost:~$ host 193.99.144.71
> 71.144.99.193.in-addr.arpa domain name pointer www.heise.de.
First, getent looks like the best answer. Using dig and requiring DNS
when it might be defined in /etc/hosts or NIS seems like a bad idea.
Secondly, file a bug against bind9-host for "Providing: host". It doesn't
provide the same interface.
Steve
--
Steve Greenland
The irony is that Bill Gates claims to be making a stable operating
system and Linus Torvalds claims to be trying to take over the
world. -- seen on the net
Reply to: