Date: Thu, 17 Sep 1998 09:20:57 -0500 (EST) From: Alfred Perlstein <bright@hotjobs.com> To: Martin Cracauer <cracauer@cons.org> Cc: current@FreeBSD.ORG Subject: Re: Proposed change to rc.d startup Message-ID: <Pine.BSF.3.96.980917090912.17139B-100000@bright.fx.genx.net> In-Reply-To: <19980917140553.A25322@cons.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <cracauer@cons.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980917090912.17139B-100000>