Subject: Re: unable to get processes to start from /etc/rc.conf
To: None <netbsd-help@netbsd.org>
From: Jukka Salmi <j+nbsd@2005.salmi.ch>
List: netbsd-help
Date: 05/24/2005 08:34:14
Mehul Sanghvi --> netbsd-help (2005-05-23 17:57:02 -0400):
> On 5/23/05, Lubomir Sedlacik <salo@xtrmntr.org> wrote:
[...]
> > is your /usr a mointpoint?  that won't work, for obvious reasons.
[...]
> 
> /usr/pkg is a seperate partition.  And I would agree with you that it
> shouldn't work,
> if the filesystems had not been mounted by the time it got to the point where it
> should be running /usr/pkg/etc/rc.d/apache.
> 
> Since it works if I put things in /etc/rc.local (/etc/rc.d/local gets
> run before the point
> where apache and pgsql should start up), I think it might not have
> anything to do with
> mount points.

It does. At the time /sbin/init executes /etc/rc, file systems are not
yet mounted. Quoting /etc/rc:

	files=$(rcorder -s nostart ${rc_rcorder_flags} /etc/rc.d/*)

	for _rc_elem in $files; do
		run_rc_script $_rc_elem start
	done

If you set rc_rcorder_flags='/usr/pkg/etc/rc.d/*' but your /usr/pkg
is not on your root file system the shell obviously can't expand this
pattern.


> I'll try your approach as well, although I would prefer to keep
> the rc.d files I install from pkgsrc seperate from the ones that came
> with the system,
> if possible.

So you need to either have /usr/pkg/etc/rc.d on the root file system or
start the programs from e.g. /etc/rc.local.


Cheers, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~