Running an application on startup in embedded linux



I need to run an application when the linux boots up which provides
the UPnP functionality of the box.
During development it was easy to boot the system, login as a root and
start the app from command line.
Moving to the production I started to think what would be the best
approach to start the app during booting.
1) Autologin to linux and run it from .bash_profile. This way seems
very flexible to me because I can always connect to the box via the
serial port and kill the app, modify it and run again. The problem is
I don't really know how to implement autologin on the sytem we have.
Should it be some special app for this or it's possible to do just
with /etc/inittab?
2) Make a daemon out of the app. This way autologin is not neccessary
and I still can connect to the system and have control over it. I'll
have no way to print out to the standard output, that's the minus.
3) Run the app straight from /etc/inittab. This is the easiest way,
but in this case the app will block the bash and it's going to be hard
to have a control over the system because now the app is blocking out
the bash.

I need an advise which way to go and maybe what to read to know more
about the way applications in embedded systems should work.

Thank you,
Andrew
.



Relevant Pages