From owner-freebsd-current Mon Oct 23 1: 6: 3 2000 Delivered-To: freebsd-current@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [209.152.133.57]) by hub.freebsd.org (Postfix) with ESMTP id 6EB7337B479 for ; Mon, 23 Oct 2000 01:06:00 -0700 (PDT) Received: (from obrien@localhost) by dragon.nuxi.com (8.9.3/8.9.1) id BAA14164; Mon, 23 Oct 2000 01:05:27 -0700 (PDT) (envelope-from obrien) Date: Mon, 23 Oct 2000 01:05:27 -0700 From: "David O'Brien" To: bv@wjv.com Cc: freebsd-current@FreeBSD.ORG Subject: Re: new rc.network6 and rc.firewall6 Message-ID: <20001023010526.A6883@dragon.nuxi.com> Reply-To: obrien@FreeBSD.ORG References: <81966.972151537@winston.osd.bsdi.com> <20001022153957.A4742@dragon.nuxi.com> <20001022214151.C7279@wjv.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001022214151.C7279@wjv.com>; from bill@bilver.wjv.com on Sun, Oct 22, 2000 at 09:41:51PM -0400 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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