[ELDK] Running a server: init or script?

Stefano Babic stefano.babic at babic.homelinux.org
Fri Jul 4 11:43:50 CEST 2008

Giuseppe Modugno wrote:
> Hi all,
> how should I start a server (for example, a web server or a ftp 
> server) on a linux box based on ELDK 4.1 SELF ramdisk?

Multiple choices here...there is no best solution, depends on you needs.

> One option is init, by using respawn action: in this way the server 
> is automatically restarted if it dies (for a bug or something else..)

In SELF, the init process is implemented by busybox.

> The other option is a script started by init with sysinit action. In 
> this way the server isn't automatically restarted if it dies for any 
> reason.

There is another difference. The sysinit script (check in the inittab)
runs once before the other processes are started. You are sure that init
does not start further processes before the script has finished.
Entries with "respawn" are started (that is, init forks) concurrently.
In the case of the network servers, I prefer personally to setup the
network in the sysiniti script and let init starts the servers later
with the respawn flag set.

> I'd use the first solution (init), but I see that modern distribution 
> (like Debian or Ubuntu) doesn't use init to start servers, but uses 
> scripts in /etc/init.d or something similar.

They can use init System V or not, but a distro is not thought for
embedded systems. Not always a system administrator wants that services
are automatically restarted and prefers to have other solutions, giving
him the time to check the problem. In case of a webserver, a redundant
machine can be a solution, when the first one fall down.


stefano <stefano.babic at babic.homelinux.org>
GPG Key: 0x55814DDE
Fingerprint 4E85 2A66 4CBA 497A 2A7B D3BF 5973 F216 5581 4DDE

More information about the eldk mailing list