From owner-freebsd-rc@FreeBSD.ORG Wed Jul 14 10:37:56 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 6DFF516A4D5 for ; Wed, 14 Jul 2004 10:37:56 +0000 (GMT) Received: from ioskeha.hittite.isp.9tel.net (ioskeha.hittite.isp.9tel.net [62.62.156.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3EDC43D54 for ; Wed, 14 Jul 2004 10:37:55 +0000 (GMT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (unknown [80.119.154.38]) by ioskeha.hittite.isp.9tel.net (Postfix) with SMTP id 61CCE14BCB7; Wed, 14 Jul 2004 12:41:54 +0200 (CEST) Message-ID: <017401c4698e$9ea32120$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: "Mike Makonnen" , References: <20040713140354.GA1695@rogue.acs-et.com> Date: Wed, 14 Jul 2004 12:37:52 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 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: Wed, 14 Jul 2004 10:37:56 -0000 "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. Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net