From owner-freebsd-current Wed Nov 18 19:25:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA29545 for freebsd-current-outgoing; Wed, 18 Nov 1998 19:25:08 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from paris.dppl.com (paris.dppl.com [205.230.74.150]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id TAA29540 for ; Wed, 18 Nov 1998 19:25:07 -0800 (PST) (envelope-from yds@ingress.net) Received: (qmail 7371 invoked from network); 19 Nov 1998 03:24:40 -0000 Received: from ichiban.ingress.com (HELO ichiban) (205.230.64.31) by paris.dppl.com with SMTP; 19 Nov 1998 03:24:40 -0000 Message-ID: <021f01be136c$244d6440$1f40e6cd@ichiban.ingress.com> From: "Yarema" To: Subject: Re: /etc/rc.d, and changes to /etc/rc? Date: Wed, 18 Nov 1998 22:24:39 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> I strongly oppose this; rc.d already exists and is standardized in several >> releases. Such a change would be gratuitous. > >I wasn't suggesting that rc.d be ditched, merely that another option be >provided if a port wished to make use of it. >> >> rc.shutdown.d would be a self-documenting name. rcK.d doesn't mean >> anything to me. (K=kill?? I don't come from a Solaris background.) > >Yep, Knnscriptname generally means "this is a shutdown script, invoke >me as scriptname stop". rc.shutdown.d would be fine, the examples I >provided were merely a rough idea. >> >> It would save people from hacking /etc/rc.shutdown (like rc.d saves >> hacking /etc/rc.local). I believe someone pointed this out already, but there's no need to make any new rc*.d directories. So long as the scripts in /usr/local/etc/rc.d are written to accept start & stop parameters the way SysVinit /etc/init.d/ scripts are written. Simply applying the patch below to /etc/rc.shutdown should allow ports to be shutdown cleanly. Should be harmless if /usr/local/etc/rc.d/*.sh scripts do not accept the stop parameter. Better yet rename the current /etc/rc.shutdown to /etc/rc.shutdown.local (analogous to /etc/rc.local) and source it into a new /etc/rc.shutdown which only does the stuff below. BTW, ${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 @@ -17,6 +17,23 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin export PATH +# If there is a global system configuration file, suck it in. +if [ -f /etc/rc.conf ]; then + . /etc/rc.conf +fi + +# for each valid dir in $local_startup, search for init scripts matching *.sh +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} ] && \ + (trap 'exit 1' 2 ; ${script} stop ; echo -n) + done + done + echo . +fi + echo -n Shutting down daemon processes: # Insert shutdown procedures here To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message