[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: httpd - Is it there or not?
From:       Rob Landley <rob () landley ! net>
Date:       2010-02-11 5:58:58
Message-ID: 201002102358.59320.rob () landley ! net
[Download RAW message or body]

On Wednesday 10 February 2010 17:22:12 Pete Helgren wrote:
> Perhaps another noob question...
>
> I may (or may not) have stumbled across an issue with httpd and
> Busybox.  Although /bin/busybox returns httpd as one of the functions,
> all of the documentation and configuration examples seem to point to
> /usr/sbin/httpd as the location, does that mean the actual executable
> has been removed?  Or does BB just implement the httpd function "within
> itself"?

Busybox is a single executable that can behave in different ways, and thus 
mimic several dozen different commands.  Busybox decides how to behave based on 
the name of the executable it was called as.  (In C terms, by matching argv[0] 
to one of the command names it knows about.)

The special name "busybox" means it shifts all its remaining arguments down 
one, thus argv[1] becomes the command name it mimics and the rest of the 
command line becomes arguments to that command.  (Developers call this the 
"busybox multiplexer applet", because we're geeks.)

If you create a symlink or hardlink at /usr/bin/httpd pointing to 
/bin/busybox, and busybox is configured with "httpd" as one of the commands it 
knows how to implement, then calling /usr/bin/httpd should work.  That's the 
standard install location for httpd, but how it _works_ is busybox gets called 
and internally looks up what behavior to do.

> I am trying to configure httpd without much success so far, but before I
> beat my head against the wall unnecessarily, I want to make sure that
> the lack of an httpd executable isn't the cause of my issue.

If you run the busybox multiplexor with no arguments (I.E. busybox when named 
"busybox"), it should spit out a list of all the commands it knows how to 
mimic.

If you need more commands, you need to rebuild busybox from source code with a 
different configuration.  (We use "make menuconfig" copied from the Linux kernel, 
it creates a .config file the rest of the build uses.)

Rob

P.S.  Hey Denys!  Some variant of "What is BusyBox and how does it work?" is 
probably a FAQ.

By the way, the text on http://busybox.net/about.html gets missed.  Ideally it 
should be at the top of the main busybox.net page (above the announcements), 
with the sponsor links that are there now moved to 
http://busybox.net/sponsors.html, then the "About BusyBox" page could be 
removed.  The "About" section in the nav bar on the left could then be 
eliminated if the "screenshots" and "announcement" pages were moved to the 
"Documentation" section.

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic