[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting hostname

On Sun, May 04, 2003 at 04:16:59PM -0600, Bob Proulx wrote:
> Guido Guenther wrote:
> > Holger Kubiak wrote:
> > foo@bar:~$ getent hosts
> >   www.heise.de

> Just noting that 'getent' is GNU libc only and does not exist on other
> systems.  It is not portable.

Then the other systems are broken, because getent is *the* only
reliable way to do NSS queries from a script.  Every Debian port needs
to provide a 'getent passwd' implementation, glibc-based or not.

Anyway, it's not like it's hard to port getent to other platforms. :-)

Steve Langasek
postmodern programmer

Attachment: pgp2IM7gVGXJs.pgp
Description: PGP signature

Reply to: