Subject: Re: Proposed rc.d changes....
To: Greywolf <firstname.lastname@example.org>
From: Simon J. Gerraty <email@example.com>
Date: 02/19/2001 22:36:02
> - Has anyone at all considered the potential of, at system rc
> run time,
> loading /etc/defaults/rc.conf
> loading /etc/rc.conf
> ONCE and then just _sourcing_ the scripts with the same shell,
> with perhaps a macro which tests to see if the requisite routine
> has been loaded in order to avoid multiple sourcing/reading/
Don't know, but I use the following trick to allow what (I think)
you are talking about.
in things that want to use foo.sh, but avoid reading it multiple times:
$_FOO_SH . foo.sh
The one that really made this important was source.sh, which did things like
searching a given path for rc files and sourcing them etc. If one of
those redfined source() directly or indirectly (while we were running it),
the shell on at least some systems would die.