[PATCH] new applet gethostbyname

Eial Czerwacki eial at scalemp.com
Wed Jul 4 05:07:42 UTC 2012


On 07/04/2012 05:08 AM, ralda at gmx.de wrote:

> Hi Paul!
> 
>> IMHO we shouldn't be inventing new applets for busybox.
>> ...
>> Creating applets with no precedent in other UNIX/POSIX
>> systems is (again IMHO) not a good idea for busybox.
> 
> In principle you are right, but Busybox is used on many small systems
> where several higher functions are controlled by shell scripts. As
> those scripts need access to several kind of information it is a good
> idea to have small applets build into Busybox to retrieve this
> information and present it in a compatible and easy to use manor. As
> this the getent command seams to be a good idea to be included in
> Busybox. The command gives access to several kind of information which
> is mostly based on glibc nsswitch functionality but this function is
> emulated within Busybox in severals ways (passwd, shadow, group,
> gshadow etc.). Implementing this in Busybox in a way that uses libbb
> functionality is perfect for information retrieval in shell
> scripts without need to look for the method on how this information is
> made available by the system. This could help to avoid to deal with
> system specific purposes in shell scripts as they are solved on a
> central (and fast/compact) place in Busybox. I would vote for a
> carefully designed implementation of a getent Busybox applet.
> 
> --
> Harald
> 
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
> 


does getent needs a valid host file in the system?

after viewing both host and getent I'm sure that host is exactly what
I've implemented. I don't think it is a good idea to base the
implementation on getent.

Eial.


More information about the busybox mailing list