Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Sep 1998 14:05:53 +0200
From:      Martin Cracauer <cracauer@cons.org>
To:        current@FreeBSD.ORG
Subject:   Proposed change to rc.d startup
Message-ID:  <19980917140553.A25322@cons.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980917140553.A25322>