Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 1998 20:40:19 +0100
From:      Ollivier Robert <roberto@keltia.freenix.fr>
To:        freebsd-current@FreeBSD.ORG
Subject:   Re: /etc/rc.d, and changes to /etc/rc?
Message-ID:  <19981123204019.A11237@keltia.freenix.fr>
In-Reply-To: <021f01be136c$244d6440$1f40e6cd@ichiban.ingress.com>; from Yarema on Wed, Nov 18, 1998 at 10:24:39PM -0500
References:  <021f01be136c$244d6440$1f40e6cd@ichiban.ingress.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981123204019.A11237>