From owner-freebsd-questions Wed Feb 21 7:52:53 2001 Delivered-To: freebsd-questions@freebsd.org Received: from be-well.ilk.org (lowellg.ne.mediaone.net [24.147.184.128]) by hub.freebsd.org (Postfix) with ESMTP id 0FEA037B69C for ; Wed, 21 Feb 2001 07:52:49 -0800 (PST) (envelope-from lowell@be-well.ilk.org) Received: (from lowell@localhost) by be-well.ilk.org (8.11.2/8.11.2) id f1LFqdR06932; Wed, 21 Feb 2001 10:52:39 -0500 (EST) (envelope-from lowell) To: freebsd-questions@freebsd.org Subject: Re: Boot up execution order - error in man pages? References: From: Lowell Gilbert Date: 21 Feb 2001 10:52:38 -0500 In-Reply-To: falbu@amnesty.org's message of "21 Feb 2001 16:11:57 +0100" Message-ID: <44u25om3sp.fsf@lowellg.ne.mediaone.net> Lines: 37 X-Mailer: Gnus v5.7/Emacs 20.7 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG falbu@amnesty.org writes: > I was trying to configure the system-wide path, so that it will > contain /usr/local/bin. I have a script which is launched in > /usr/local/etc/rc.d and it needed that path. This is probably not the best approach. Just have your script specify the complete path; it's not important for security as it is in interactive use, but it's still a good habit. > According to the manual (FreeBSD 4.1) : > "The rc.d directories contain scripts which will be automatically executed > at boot time. The specified directories are processed immediately after > rc.local is executed. (See below for details on how to specify directo­ > ries to check.) " > > It seems to me that this is not true. It is true. It is quite clear from looking at rc itself, where the call to rc.local is only half a dozen lines before the check of the $local_startup directories. > At the point the script from the rc.d folder is launched, the content of > the > PATH variable is as specified in /etc/rc, even if I have added the right > settings in /etc/rc.local. rc.local does not do configuration; it is executed in a separate shell, and none of its variables propagate back. > Since it's recommended _not_ to modify /etc/rc, where should I alter the > PATH variable to be effective at startup time (when launching /etc/rc.d)? You shouldn't. You could do it in rc.conf, but you'd really be much better off not doing it at all. Good luck. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message