Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Apr 2003 13:07:26 +0200
From:      Andreas Klemm <andreas@FreeBSD.org>
To:        Lev Walkin <vlm@netli.com>
Cc:        ports@FreeBSD.org
Subject:   Re: ipcad start/stop script
Message-ID:  <20030403110726.GA1102@titan.klemm.apsfilter.org>
In-Reply-To: <3E8BD4B3.8010609@netli.com>
References:  <20030402080721.GA78889@titan.klemm.apsfilter.org> <3E8B762C.1060508@netli.com> <20030403054853.GB3051@titan.klemm.apsfilter.org> <3E8BD4B3.8010609@netli.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--0OAP2g/MAC+5xKAE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.
>=20
> 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.
>=20
> 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 ///

--=20
Andreas Klemm - Powered by FreeBSD 4.7
Need a magic printfilter today ? -> http://www.apsfilter.org/

--0OAP2g/MAC+5xKAE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+jBXtd3o+lGxvbLoRApV+AJ9rmK6L9LV/UyGYtqFZSLHbMzDk6ACdEjsR
dK0xYghSX3iSjEY7RiaD5LQ=
=8Pod
-----END PGP SIGNATURE-----

--0OAP2g/MAC+5xKAE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030403110726.GA1102>