starting apps in 5.2

Matthew Seaman m.seaman at infracaninophile.co.uk
Sat Jan 3 12:33:11 PST 2004


On Sat, Jan 03, 2004 at 12:38:33PM -0600, J.D. Bronson wrote:

> I built these from scratch and wondering if anyone has a web page that 
> shows the correct way to setup and use rc.conf and rc.d files?

Well, there's the rc.conf(5) man page, and the /etc/defaults/rc.conf
file, which will show you all of the default settings.  rc.conf is
pretty simple really -- it's just a list of shell variable assignments
which all of the other /etc/rc* scripts read and which controls their
behaviour.

As for rc.d scripts for the programs you compiled, probably the best
thing to do is extract the startup scripts from the corresponding
ports.  Note however that qpopper(8) is run out of inetd(8) -- you
need to add the following line to /etc/inetd.conf:

   pop3 stream tcp nowait root /usr/local/libexec/qpopper qpopper -s

and then restart inetd:

   # kill -HUP `cat /var/run/inetd.pid`

(if you're already running inetd, that is.  If you aren't then a quick
perusal of the rc.conf stuff above will show you what to do.)

While you can run samba out of inetd(8), most people will run it
standalone.  In this case, simply copy the file
/usr/port/net/samba/files/samba.sh.sample to
/usr/local/etc/rc.d/samba.sh, make sure it's owned by root:wheel and
mode 750 or 755 and then just run it -- usually with rc.d files you
need to give the full path:

    # /usr/local/etc/rc.d/samba.sh start

(No prizes for guessing that you can substitute 'stop' in that command
line to turn samba off again).  This assumes that you've installed all
of the samba executables in appropriate places, created the
directories it needs to run and so forth.  You may have to customize
the script if you've put things in odd places.

If this all seems tedious and complicated -- you've only yourself to
blame.  If you'ld just installed from ports, all this would either be
handled automatically for you, or you'ld get instructions as to what
to do next printed out.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040103/a808ecfd/attachment.bin


More information about the freebsd-questions mailing list