start phases

Taavi Talvik <>
Thu Mar 3 19:53:34 CET 2005


On Thu, 3 Mar 2005, Ulf Wiger (AL/EAB) wrote:

> The idea is that we should be able to extend the start phase concept
> significantly, and get cleaner (and perhaps faster) execution of complex
> system start sequences.
>
> While you can still specify dependencies in the 'applications' attribute
> as before, you can now also specify dependencies for each start phase,
> like so:
>
> {start_phases, [{Phase, Arg, [{run_before, [app() | phase()]} |
>                              {run_after, [app() | phase()]}]}]}

Look at FreeBSD(NetBSD?) startup scripts. They are shell scripts,
which have keywords in first fiew lines. On the startup keywords
are extracted and topologically sorted. Then they are executed in
appropriate order.

Example:
            #!/bin/sh
            #

            # REQUIRE: networking syslog
            # REQUIRE: usr
 	   # BEFORE: LOGIN
            # PROVIDE: dns nscd
            # KEYWORD: FreeBSD

man rcorder(8) rc(8) etc.

Just having run_before/run_after are probably not enough.

best regards,
taavi



More information about the erlang-questions mailing list