From owner-freebsd-current Thu Sep 17 05:06:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA25558 for freebsd-current-outgoing; Thu, 17 Sep 1998 05:06:20 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cons.org (knight.cons.org [194.233.237.86]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA25544 for ; Thu, 17 Sep 1998 05:06:17 -0700 (PDT) (envelope-from cracauer@cons.org) Received: (from cracauer@localhost) by cons.org (8.8.8/8.7.3) id OAA25336 for current@freebsd.org; Thu, 17 Sep 1998 14:05:54 +0200 (CEST) Message-ID: <19980917140553.A25322@cons.org> Date: Thu, 17 Sep 1998 14:05:53 +0200 From: Martin Cracauer To: current@FreeBSD.ORG Subject: Proposed change to rc.d startup Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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