Am 03.07.2012 16:48, schrieb Eial Czerwacki: > On 07/03/2012 05:39 PM, Joshua Judson Rosen wrote: > >> On 2012-07-03 05:11, Baruch Siach wrote: >>> Hi Eial, >>> >>> On Tue, Jul 03, 2012 at 10:57:50AM +0300, Eial Czerwacki wrote: >>>> I'd like to propose a new applet, gethostbyname. >>>> all this applet does is to get a host name and return the first ip >>>> address. >>> >>> IMHO, this applet should be called 'host', just like the similarly >>> named BIND >>> utility. >> >> No, they're different things: BIND's `host' utility specifically queries >> DNS--and only DNS: >> it doesn't resolve names via /etc/hosts, NIS, mDNS, etc. >> >> gethostbyname() uses whatever resolver backends are available in libc >> (i.e.: nsswitch). >> >> So it might be a good idea for Eial to model this new applet on glibc's >> "getent" command >> (both in name and behaviour). >> > > > Joshua, > > I cannot find any reference to glibc's "getent" command, can you point > me to such reference?
For glibc there are actualy only getent{sp,mnt,serv,..}ent calls but there is also a getent cmd that comes with glibc (i totally forgot about it). /usr/bin/getent --usage Usage: getent [-?V] [-s CONFIG] [--service=CONFIG] [--help] [--usage] [--version] Datenbank [Schlüssel ...] re, wh _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox