From owner-freebsd-hackers Wed Jun 13 17:35:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.noos.fr (lafontaine.noos.net [212.198.2.72]) by hub.freebsd.org (Postfix) with ESMTP id 3F05337B401 for ; Wed, 13 Jun 2001 17:35:44 -0700 (PDT) (envelope-from clefevre@redirect.to) Received: (qmail 1900179 invoked by uid 0); 14 Jun 2001 00:35:42 -0000 Received: from unknown (HELO gits.dyndns.org) ([212.198.228.81]) (envelope-sender ) by 212.198.2.72 (qmail-ldap-1.03) with SMTP for ; 14 Jun 2001 00:35:42 -0000 Received: (from root@localhost) by gits.dyndns.org (8.11.3/8.11.3) id f5E0ZbF52515; Thu, 14 Jun 2001 02:35:38 +0200 (CEST) (envelope-from clefevre@redirect.to) To: Jon Parise Cc: Matt Dillon , Will Andrews , Andrew Hesford , Warner Losh , Mark Santcroos , Doug Barton , bsddiy@163.net, freebsd-hackers@FreeBSD.ORG Subject: Re: import NetBSD rc system References: <200106111854.f5BIsX728995@earth.backplane.com> <20010611174717.A77956@laptop.6bone.nl> <1795096378.20010611154930@163.net> <3B2484EA.B1F04812@DougBarton.net> <200106111800.f5BI0il25446@billy-club.village.org> <200106111854.f5BIsX728995@earth.backplane.com> <200106111856.f5BIu8V39651@harmony.village.org> <20010611203749.D24399@core.usrlib.org> <20010611205158.J23562@bohr.physics.purdue.edu> <200106120305.f5C35Ri37415@earth.backplane.com> <20010611233420.I26841@csh.rit.edu> X-Face: V|+c;4!|B?E%BE^{E6);aI.[<97Zd*>^#%Y5Cxv;%Y[PT-LW3;A:fRrJ8+^k"e7@+30g0YD0*^^3jgyShN7o?a]C la*Zv'5NA,=963bM%J^o]C Reply-To: Cyrille Lefevre In-Reply-To: <20010611233420.I26841@csh.rit.edu> Mail-Copies-To: never From: Cyrille Lefevre Date: 14 Jun 2001 02:35:36 +0200 Message-ID: Lines: 76 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jon Parise 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:clefevre@redirect.to UNIX is user-friendly; it's just particular work: mailto:Cyrille.Lefevre@edf.fr about who it chooses to be friends with. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message