Subject: Re: starting packes on boot
To: Mipam <mipam@ibb.net>
From: Mirko Thiesen <thiesi@NetWorkXXIII.de>
List: netbsd-help
Date: 01/17/2005 20:30:20
On Mon, 17 Jan 2005, Mipam wrote:

> I installed quid, works fine now, but i don't know how to start it from

That's fine.

> boot. I enabled squid in /etc/rc.conf (squid=YES) and copied the squid.sh
> script from pkgsrc/www/squid/work/squid.sh to /usr/pkg/etc/rc.d/squid.sh

After installing a package, its rc.d scripts are installed to
LOCALBASE/share/examples/rc.d, I think, where LOCALBASE defaults to
/usr/pkg. Thus, you can find squid's example rc.d script in
/usr/pkg/share/examples/rc.d. From there, you should copy it to
RCD_SCRIPTS_DIR, which defaults to /etc/rc.d. Usually /etc/rc.d is a good
choice because it resides on a filesystem that is mounted early while
booting.

When compiling from pkgsrc, you can change this behaviour by setting the
appropriate variables in /etc/mk.conf. Have a look at
/usr/pkgsrc/mk/defaults/mk.conf and look for LOCALBASE and
RCD_SCRIPTS_DIR, and probably also for PKG_RCD_SCRIPTS.

> When i manually start squid /usr/pkg/etc/rc.d/squid.sh start
> it works fine, but it doesnt start when i boot.
> How do i make this squid being run from start exept putting it in
> /etc/rc.local?

Just copy "/usr/pkg/share/examples/rc.d/squid" to "/etc/rc.d/squid", and
everything should work as expected.

Bye, K&K,
T-Zee
-- 
thiesi@NetWork23.Sytes.NET ---- NetBSD: Power to the people!
Tel.: ++49-(0)171-416 05 09 -- Fax: ++49-(0)171-134 16 05 09
Mirko Thiesen, Soemmeringstrasse 41, D-10589 Berlin, Germany
              "We're with you all the way, mostly"