From owner-freebsd-rc@FreeBSD.ORG Fri Jul 16 14:56:06 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4FEA16A4CE for ; Fri, 16 Jul 2004 14:56:06 +0000 (GMT) Received: from telecom.net.et (sparrow.telecom.net.et [213.55.64.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id B27D943D45 for ; Fri, 16 Jul 2004 14:56:04 +0000 (GMT) (envelope-from mtm@identd.net) Received: from [213.55.68.139] (HELO pool-151-200-10-97.res.east.verizon.net) by telecom.net.et (CommuniGate Pro SMTP 3.4.8) with ESMTP-TLS id 51797557; Fri, 16 Jul 2004 17:49:27 +0300 Received: from rogue.acs-et.com (localhost [127.0.0.1]) ESMTP id i6GEuW1X039260; Fri, 16 Jul 2004 17:56:40 +0300 (EAT) (envelope-from mtm@rogue.acs-et.com) Received: (from mtm@localhost) by rogue.acs-et.com (8.12.11/8.12.11/Submit) id i6GEuPwE039259; Fri, 16 Jul 2004 17:56:25 +0300 (EAT) (envelope-from mtm) Date: Fri, 16 Jul 2004 17:56:23 +0300 From: Mike Makonnen To: Cyrille Lefevre Message-ID: <20040716145622.GC10133@rogue.acs-et.com> References: <20040713140354.GA1695@rogue.acs-et.com> <017401c4698e$9ea32120$7890a8c0@dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <017401c4698e$9ea32120$7890a8c0@dyndns.org> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD/5.2-CURRENT (i386) cc: freebsd-rc@FreeBSD.org Subject: Re: localpkg script changes X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2004 14:56:06 -0000 On Wed, Jul 14, 2004 at 12:37:52PM +0200, Cyrille Lefevre wrote: > "Mike Makonnen" wrote: > > > > I was looking at integrating ports rc.d scripts a bit better, and the > following is > > what I came up with. I would appreciate reviews, tests, etc.. > > > > Index: etc/rc.d/localpkg > > =================================================================== > [snip] > > load_rc_config $name > > -run_rc_command "$1" > > + > > +# We can't use the normal rc.subr(8) start/stop plumbing > > +# because we call run_rc_script(), which unsets all the > > +# global variables that said plumbing needs. > > +# > > +case "$1" in > > +start|faststart) > > + pkg_start > > + ;; > > +stop|faststop) > > + pkg_stop > > + ;; > > +restart|fastrestart) > > + pkg_stop > > + pkg_start > > + ;; > > +esac > > what about other states, such as rcvar, status and poll ? > what for non-standard states, such as reload, etc. This script is intended more for startup/shutdown use. Anything more would be overkill. If I want to find out the status of a I should use the rc.d script belonging to the program. Although status might be convenient to have... Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon !