Date: Mon, 23 Oct 2000 01:05:27 -0700 From: "David O'Brien" <obrien@FreeBSD.ORG> To: bv@wjv.com Cc: freebsd-current@FreeBSD.ORG Subject: Re: new rc.network6 and rc.firewall6 Message-ID: <20001023010526.A6883@dragon.nuxi.com> In-Reply-To: <20001022214151.C7279@wjv.com>; from bill@bilver.wjv.com on Sun, Oct 22, 2000 at 09:41:51PM -0400 References: <ume@mahoroba.org> <81966.972151537@winston.osd.bsdi.com> <20001022153957.A4742@dragon.nuxi.com> <20001022214151.C7279@wjv.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 22, 2000 at 09:41:51PM -0400, Bill Vermillion wrote: > One of the reasons for the numbers in the SysVR4 arena is to > set the order of execution so programs which other depend upon > are executed first. How does the NetBSD solve this problem. Very coolly. The main rc script runs a script named `rcorder' to generate the proper order. rc.shutdown also uses `rcorder' but reverses the ordering. Two examples are included below to show what `rcorder' uses to generate the list. These NetBSD rc files also provide "start", "stop", "restart", "status", etc. commands to assist the sysadmin. Again, *very* slick and still quite BSD-like. === /etc/rc.d/ypbind === #!/bin/sh # # $NetBSD: ypbind,v 1.3 2000/05/13 08:45:10 lukem Exp $ # # PROVIDE: ypbind # REQUIRE: ypserv . /etc/rc.subr name="ypbind" rcvar=$name command="/usr/sbin/${name}" start_precmd="ypbind_precmd" ypbind_precmd() { _domain=`domainname` if [ -z "$_domain" ]; then warn "domainname(1) is not set." return 1 fi } load_rc_config $name run_rc_command "$1" === /etc/rc.d/ypserv === #!/bin/sh # # $NetBSD: ypserv,v 1.4 2000/06/02 22:54:13 fvdl Exp $ # # PROVIDE: ypserv # REQUIRE: rpcbind . /etc/rc.subr name="ypserv" rcvar=$name command="/usr/sbin/${name}" required_vars="rpcbind" start_precmd="ypserv_precmd" ypserv_precmd() { _domain=`domainname` if [ -z "$_domain" ]; then warn "domainname(1) is not set." return 1 fi if [ ! -d /var/yp/$_domain/. ]; then warn "/var/yp/$_domain is not a directory." return 1 fi } load_rc_config $name run_rc_command "$1" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001023010526.A6883>