From owner-freebsd-arch Fri Jun 22 20:24:11 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail.noos.fr (descartes.noos.net [212.198.2.74]) by hub.freebsd.org (Postfix) with ESMTP id 4308F37B408 for ; Fri, 22 Jun 2001 20:24:00 -0700 (PDT) (envelope-from clefevre@redirect.to) Received: (qmail 7532218 invoked by uid 0); 23 Jun 2001 03:23:58 -0000 Received: from unknown (HELO gits.dyndns.org) ([212.198.231.187]) (envelope-sender ) by 212.198.2.74 (qmail-ldap-1.03) with SMTP for ; 23 Jun 2001 03:23:58 -0000 Received: (from root@localhost) by gits.dyndns.org (8.11.4/8.11.4) id f5LKh3W13812; Thu, 21 Jun 2001 22:43:03 +0200 (CEST) (envelope-from clefevre@redirect.to) To: obrien@FreeBSD.ORG Cc: arch@FreeBSD.ORG Subject: Re: (FWD) Re: import NetBSD rc system References: <20010620182320.D99923@dragon.nuxi.com> 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: <20010620182320.D99923@dragon.nuxi.com> Mail-Copies-To: never From: Cyrille Lefevre Date: 21 Jun 2001 22:43:02 +0200 Message-ID: <3d8tftt5.fsf@gits.dyndns.org> Lines: 112 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-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "David O'Brien" writes: [snip] > diff -ur /usr/src/etc/rc etc/rc > --- /usr/src/etc/rc Fri May 11 12:06:55 2001 > +++ etc/rc Sat Jun 16 15:46:27 2001 > @@ -52,6 +52,39 @@ > PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin > export HOME PATH > > +# If there is a global system configuration file, suck it in. > +# > +if [ -r /etc/defaults/rc.conf ]; then > + . /etc/defaults/rc.conf > + source_rc_confs > +elif [ -r /etc/rc.conf ]; then > + . /etc/rc.conf > +fi > + > +case ${new_rc} in > +[Yy][Ee][Ss]) maybe a check of the existance of /etc/rc.subr have to be done ? > + . /etc/rc.subr > + > + _rc_conf_loaded=YES > + > + if [ "$1" = autoboot ]; then > + autoboot=yes > + _rc_fast_run=yes # run_rc_command(): do fast booting > + fi > + > + files=`rcorder -s nostart /etc/rc.d/*` > + > + for _rc_elem in $files; do > + run_rc_script $_rc_elem start > + done > + > + exit 0 > + ;; > +*) > + # fall-through to the old rc scripts > + ;; IMHO, the above three lines aren't needed. > +esac > + > # BOOTP diskless boot. We have to run the rc file early in order to > # retarget various config files. > # > @@ -60,15 +93,6 @@ > if [ ${dlv:=0} != 0 ]; then > . /etc/rc.diskless1 > fi > -fi > - > -# If there is a global system configuration file, suck it in. > -# > -if [ -r /etc/defaults/rc.conf ]; then > - . /etc/defaults/rc.conf > - source_rc_confs > -elif [ -r /etc/rc.conf ]; then > - . /etc/rc.conf > fi > > feed_dev_random() { > diff -ur /usr/src/etc/rc.shutdown etc/rc.shutdown > --- /usr/src/etc/rc.shutdown Sun Dec 17 00:15:57 2000 > +++ etc/rc.shutdown Sat Jun 16 15:46:32 2001 > @@ -52,6 +52,26 @@ > . /etc/rc.conf > fi > > +case ${new_rc} in > +[Yy][Ee][Ss]) > + . /etc/rc.subr > + > + files=`rcorder -k shutdown /etc/rc.d/*` > + for i in $files; do # reverse order of files > + nfiles="$i $nfiles" > + done > + files=$nfiles > + > + for i in $files; do > + run_rc_script $i stop > + done > + > + exit 0 > + ;; > +*) > + ;; same assertion here. > +esac > + > # Write some entropy so the rebooting /dev/random can reseed > # > case ${entropy_file} in > ---------- see you. 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-arch" in the body of the message