From owner-freebsd-current Thu Sep 17 06:19:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA05091 for freebsd-current-outgoing; Thu, 17 Sep 1998 06:19:37 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from bright.fx.genx.net (bright.fx.genx.net [206.64.4.154]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA05083 for ; Thu, 17 Sep 1998 06:19:35 -0700 (PDT) (envelope-from bright@hotjobs.com) Received: from localhost (bright@localhost) by bright.fx.genx.net (8.9.1/8.8.8) with SMTP id JAA17165; Thu, 17 Sep 1998 09:20:57 -0500 (EST) (envelope-from bright@hotjobs.com) X-Authentication-Warning: bright.fx.genx.net: bright owned process doing -bs Date: Thu, 17 Sep 1998 09:20:57 -0500 (EST) From: Alfred Perlstein X-Sender: bright@bright.fx.genx.net To: Martin Cracauer cc: current@FreeBSD.ORG Subject: Re: Proposed change to rc.d startup In-Reply-To: <19980917140553.A25322@cons.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG y'know the funny thing is that i was thinking of hacking something so that /etc/rc.conf would have a flag telling to to protect its children from ^C and such. solaris does this, or at least seems to (^C doesn't muck with startup programs) it'd be a nice option for a lab/hostile cluebie enviorment: /etc/rc.conf: nocontrolc = "YES" /etc/rc: (right after rc.conf is sucked in) if [ "x$nocontrolc" = "xYES" ]; then trap 'echo -n' 2; fi if anyone cares it'd be nice to have the option of: a) no protection b) rc.* protection excluding rc.local c) full protection d) since i don't use rc.d some way here of setting protection on/off another question about /etc/rc, why does it wait till after the fsck to read in rc.conf? i mean it sorta makes sense... Alfred Perlstein - Programmer, HotJobs Inc. - www.hotjobs.com -- There are operating systems, and then there's FreeBSD. -- http://www.freebsd.org/ 3.0-current On Thu, 17 Sep 1998, Martin Cracauer wrote: > When starting /usr/local/etc/rc.d stuff, you cannot get past > applications that block SIGINT and don't return. You can always use > SIGQUIT, but that aborts, no further processing of rc.d is done. > > The following change puts a "guarding" shell around each script. That > way, you can get past one application's start and processed with the > others. > > It is somewhat ugly, hence my desire to inform you in advance. The > echo -n at the end is needed to keep /bin/sh from a wrong > optimization. The fixes I have for sh either impact efficiency or are > too complicated to push them into 3.0, IMO. > > Maybe someone has a better idea, but short of using a C program to get > the same effect, I think that's the best to do for now. > > # for each valid dir in $local_startup, search for init scripts matching *.sh > if [ "X${local_startup}" != X"NO" ]; then > echo -n 'Local package initialization:' > for dir in ${local_startup}; do > [ -d ${dir} ] && for script in ${dir}/*.sh; do > [ -x ${script} ] && \ > (trap 'exit 1' 2 ; ${script} start ; echo -n) > # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > done > done > echo . > fi > > Martin > -- > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > Martin Cracauer http://www.cons.org/cracauer > Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536 > Paper: (private) Waldstrasse 200, 22846 Norderstedt, Germany > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message