From owner-freebsd-ports@FreeBSD.ORG Thu Apr 3 03:10:18 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0915337B401 for ; Thu, 3 Apr 2003 03:10:18 -0800 (PST) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F06343F3F for ; Thu, 3 Apr 2003 03:10:16 -0800 (PST) (envelope-from andreas@klemm.apsfilter.org) Received: from srv1.cosmo-project.de (localhost [IPv6:::1]) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h33BADcx022446 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 3 Apr 2003 13:10:13 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: (from uucp@localhost)h33BACQC022445; Thu, 3 Apr 2003 13:10:12 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: from titan.klemm.apsfilter.org (localhost.klemm.apsfilter.org [127.0.0.1]) by klemm.apsfilter.org (8.12.9/8.12.8) with ESMTP id h33B7Q4s001805; Thu, 3 Apr 2003 13:07:31 +0200 (CEST) (envelope-from andreas@titan.klemm.apsfilter.org) Received: (from andreas@localhost) by titan.klemm.apsfilter.org (8.12.9/8.12.8/Submit) id h33B7QSC001804; Thu, 3 Apr 2003 13:07:26 +0200 (CEST) Date: Thu, 3 Apr 2003 13:07:26 +0200 From: Andreas Klemm To: Lev Walkin Message-ID: <20030403110726.GA1102@titan.klemm.apsfilter.org> References: <20030402080721.GA78889@titan.klemm.apsfilter.org> <3E8B762C.1060508@netli.com> <20030403054853.GB3051@titan.klemm.apsfilter.org> <3E8BD4B3.8010609@netli.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: <3E8BD4B3.8010609@netli.com> X-Operating-System: FreeBSD 4.8-RC X-Disclaimer: A free society is one where it is safe to be unpopular User-Agent: Mutt/1.5.3i cc: ports@FreeBSD.org Subject: Re: ipcad start/stop script X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2003 11:10:18 -0000 --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--