ipcad start/stop script

Andreas Klemm andreas at FreeBSD.org
Thu Apr 3 03:10:18 PST 2003


On Wed, Apr 02, 2003 at 10:29:07PM -0800, Lev Walkin wrote:
> Andreas Klemm wrote:
> >On Wed, Apr 02, 2003 at 03:45:48PM -0800, Lev Walkin wrote:
> >>what about
> >>echo 'ipcad -rds 2>/dev/null && echo ipcad' >> /etc/rc.local
> >>seems much simpler.
> >
> >
> >I used an existing start stop script as template.
> >
> >The test statements take care, that it only runs,
> >if the ipcad binary is there to avoid unnecessary
> >error messages and that it will be started only with
> >a valid config.
> 
> my case avoids unnecessary error messages too :)

Yes but it actually start an "unknown" application,
this costs startup time and you don't know what happens
to let it run without configuration file.

You as owner of the software perhaps know, what it does.
But all other people don't know.

Therefore I strongly prefer this kind of "defensive" start script
programming. Not fire it up, "lets see", but in fact we don't see
anything, because stderr is being written to /dev/null.

> >Since your port doesn't install a standard config file
> >PREFIX/etc/ipcad.conf, somebody who installs ipcad
> >package for later usage would get failures after reboot
> >because of the missing config file.
> 
> yes, it is intentional to not to override a possibly
> existing one.

Thats no problem, I only say, it shouldnt be started
under root privs, if there is no valid config.

Therefore the testclauses in the startup script that
I favourize.


	Andreas ///

-- 
Andreas Klemm - Powered by FreeBSD 4.7
Need a magic printfilter today ? -> http://www.apsfilter.org/
-------------- 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-ports/attachments/20030403/90f759a7/attachment.bin


More information about the freebsd-ports mailing list