[BusyBox] how to automatically start an app at boot time?

Steve Dover sw0rdf1sh at sbcglobal.net
Sun Jan 18 19:50:35 UTC 2004


Robert P. J. Day wrote:
>   currently, a couple of us are grappling with trying to start an app at
> boot time.  we're using 1.00-pre5, with
> 
>   /linuxrc -> bin/busybox
> 
> and a simple inittab with a single shell being started with the "askfirst"
> action field.
> 
>   our first obvious attempt was to check out /etc/init.d/rcS, and at the
> bottom, there is a conditional invocation of /sbin/setup.sh.  so we just
> added the invocation of our application to /sbin/setup.sh.
> 
>   sadly, our app doesn't get invoked at boot time, but it runs just fine
> if we start it manually once we get a shell prompt.
> 
>   can someone explain the ideal method for starting the main system
> app at boot time?  we need to be able to set a few environment vars
> before actually starting it.  so what's the recipe?  thanks.
> 
> rday

In your inittab, have an entry that kicks off rcS :

::sysinit:/etc/init.d/rcS

Have that script do your setup stuff such as mounting /proc, etc.
and have it start any background daemons that you want running.




More information about the busybox mailing list