Subject: Re: How to start new servers
To: None <netbsd-help@netbsd.org>
From: Roberto <roberto@redix.it>
List: netbsd-help
Date: 10/14/2005 17:59:45
> Vittorio on 2005-10-14 14:55:10 +0100:
>
>> As a netbsd 2.0.2 newbye having experience with freebsd 5.4 I've just
>> compiled from the sources under pkgsrc both samba and postgresql BUT I
>> cannot find those helpful scripts like the freebsd 010.pgsql.sh and
>> samba.sh which are neatly placed under /usr/local/etc/rc.d in freebsd
>> but  seem to be nowhere under netbsd (I expected them under
>> /usr/pkg/etc/rc.d but they weren't there)
>
> You'll want to look in /usr/pkg/share/examples/rc.d/ (if memory
> serves) to find the rc scripts.  Place them in /etc/rc.d/ and add
> appropriate variables to /etc/rc.conf.
>

Should be better:

1) cp /usr/pkg/share/examples/rc.d/xxx.sh /usr/pkg/etc/rc.d/

2) edit the /etc/rc.local and add:
#
# start daemon
if [ -f /usr/pkg/etc/rc.d/xxxx.sh ]; then
       echo -n ' xxxx Daemon '
       /usr/pkg/etc/rc.d/xxxx.sh start
fi

Or not?

PRO: the pkg application & script are separated by the system (/etc -
/usr/pkg/etc );

CONS: the script is run when rc.local is executed and the sequence cannot be
changed by rcorder;

Regards,
Roberto