From owner-freebsd-current Mon Nov 23 11:41:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA07528 for freebsd-current-outgoing; Mon, 23 Nov 1998 11:41:14 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA07521 for ; Mon, 23 Nov 1998 11:41:08 -0800 (PST) (envelope-from roberto@keltia.freenix.fr) Received: (from uucp@localhost) by frmug.org (8.9.1/frmug-2.3/nospam) with UUCP id UAA03694 for freebsd-current@FreeBSD.ORG; Mon, 23 Nov 1998 20:41:04 +0100 (CET) (envelope-from roberto@keltia.freenix.fr) Received: by keltia.freenix.fr (Postfix, from userid 101) id 80129147E; Mon, 23 Nov 1998 20:40:19 +0100 (CET) Date: Mon, 23 Nov 1998 20:40:19 +0100 From: Ollivier Robert To: freebsd-current@FreeBSD.ORG Subject: Re: /etc/rc.d, and changes to /etc/rc? Message-ID: <19981123204019.A11237@keltia.freenix.fr> Mail-Followup-To: freebsd-current@FreeBSD.ORG References: <021f01be136c$244d6440$1f40e6cd@ichiban.ingress.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.94.16i In-Reply-To: <021f01be136c$244d6440$1f40e6cd@ichiban.ingress.com>; from Yarema on Wed, Nov 18, 1998 at 10:24:39PM -0500 X-Operating-System: FreeBSD 3.0-CURRENT/ELF ctm#4829 AMD-K6 MMX @ 200 MHz Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to Yarema: > ${local_startup} in /etc/rc.conf becomes rather misnamed if this patch is > adopted. > --- rc.shutdown.orig Fri Aug 1 20:22:45 1997 > +++ rc.shutdown Wed Nov 18 22:10:04 1998 This one runs the scripts in reverse order. --- /usr/src/etc/rc.shutdown Sat Aug 2 02:22:45 1997 +++ rc.shutdown Mon Nov 23 20:39:57 1998 @@ -17,10 +17,30 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin export PATH -echo -n Shutting down daemon processes: +echo Shutting down daemon processes: # Insert shutdown procedures here +if [ -f /etc/rc.conf ]; then + . /etc/rc.conf +fi + +echo '' +# for each valid dir in $local_startup, search for init scripts matching +# *.sh +if [ "X${local_startup}" != X"NO" ]; then + echo 'Local package shutdown:' + # reverse the directory list + for dir in ${local_startup}; do + rdir_list="${dir} ${rdir_list}" + done + for dir in ${rdir_list}; do + [ -d ${dir} ] && for script in `/bin/ls -r ${dir}/*.sh`; do + [ -x ${script} ] && \ + (trap 'exit 1' 2 ; ${script} stop ; echo -n) + done + done +fi echo '.' exit 0 -- Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 3.0-CURRENT #2: Sun Nov 8 01:22:20 CET 1998 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message