[BusyBox] how to automatically start an app at boot time?
Karl Bongers
karl at turbobit.com
Sun Jan 18 08:15:44 UTC 2004
On Sun, Jan 18, 2004 at 02:37:28PM -0500, 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.
I don't think there is an ideal method, all depends on what
you want. Here is something that works for me in inittab with
a stock bash/init(not busybox, but it will hopefully apply):
#1:2345:respawn:/sbin/getty 38400 tty1
1:2345:respawn:/bin/sh -c "/app/startapp.sh"
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
More information about the busybox
mailing list