From owner-freebsd-stable Sun Jul 9 11:11:29 2000 Delivered-To: freebsd-stable@freebsd.org Received: from fnal.gov (heffalump.fnal.gov [131.225.9.20]) by hub.freebsd.org (Postfix) with ESMTP id 0E07D37B94B for ; Sun, 9 Jul 2000 11:11:26 -0700 (PDT) (envelope-from zingelman@fnal.gov) Received: from nova.fnal.gov ([131.225.18.207]) by smtp.fnal.gov (PMDF V6.0-24 #44770) with ESMTP id <0FXF004HYZV0BB@smtp.fnal.gov> for freebsd-stable@FreeBSD.ORG; Sun, 09 Jul 2000 13:11:24 -0500 (CDT) Received: from localhost (tez@localhost) by nova.fnal.gov (8.9.3+Sun/8.9.1) with ESMTP id NAA15479 for ; Sun, 09 Jul 2000 13:11:23 -0500 (CDT) Date: Sun, 09 Jul 2000 13:11:23 -0500 (CDT) From: Tim Zingelman Subject: Re: HEADS UP: /etc/rc.shutdown calls local scripts now X-Sender: tez@nova.fnal.gov To: freebsd-stable@FreeBSD.ORG Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII X-Authentication-warning: nova.fnal.gov: tez owned process doing -bs Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 7 Jul 2000, Doug Barton wrote: > > /usr/local/etc/rc.d now must _pay attention_ to the argument sent to > > them. Right now, many scripts in there do a startup procedure when > > called. (period) This will need to be fixed. There _will_ be some pain. > And what some of us are saying is that the pain is not a > requirement to make this feature work. There are ways to accomplish the > goal that this proposal wants to accomplish without all of the "pain" that > suddenly changing everything around will engender. > Doug I agree. How painful would it be to grep the scripts for "stop.*)" and only execute those that match at shutdown time? if [ "X${local_startup}" != X"NO" ]; then echo -n 'Local package shutdown:' for dir in ${local_startup}; do [ -d ${dir} ] && for script in ${dir}/*.sh; do [ -x ${script} ] && grep -q "stop.*)" ${script} && \ (set -T ; trap 'exit 1' 2 ; ${script} stop) done done echo . fi The key part here is the addition of: grep -q "stop.*)" ${script} && Certainly not guaranteed to catch everything, but much better than nothing IMHO. - Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message