Jon Parise <[EMAIL PROTECTED]> writes:

[snip]
> With the proposed NetBSD-derived system, individual services are
> isolated in their very own scripts, making starting / stopping
> them very convenient (the only advantage I see to the SysV
> layout).  In addition, the integrity of dependency graph is also
> maintained, while retaining extra flexibility.

not always. the dependency graph works fine if you start/stop all
services at once, but not individually such as :

starting nfsd should required mountd but actually, it don't start it.

let's try :

(for testing purpose, all rc files have been modified to use relative
references instead of absolute ones)

$ cat rc.conf
rc_configured=YES
rc1=YES
rc2=YES

$ cat rc.d/rc1
# PROVIDE: rc1
# REQUIRE: rc2

_etc=${_etc:-${0%/*}/..}
. $_etc/rc.subr

name="rc1"
rcvar="rc1"
command="/bin/echo"
command_args="rc1"
required_vars="rc2"

load_rc_config $name
run_rc_command "$1"

$ cat rc.d/rc2
# PROVIDE: rc2

_etc=${_etc:-${0%/*}/..}
. $_etc/rc.subr

name="rc2"
rcvar="rc2"
command="/bin/echo"
command_args="rc2"
required_vars="rc1"

load_rc_config $name
run_rc_command "$1"

$ ./rc
Thu Jun 14 02:33:23 CEST 2001
Starting rc2.
rc2
Starting rc1.
rc1
Thu Jun 14 02:33:24 CEST 2001

ok, rc1 depends on rc2, so rc2 is started before rc1.
now, just start rc1 :

$ rc.d/rc1 start
Starting rc1.
rc1

oops, rc2 isn't started. too bad.

Cyrille.
--
home: mailto:[EMAIL PROTECTED]   UNIX is user-friendly; it's just particular
work: mailto:[EMAIL PROTECTED]   about who it chooses to be friends with.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to