Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jul 2004 17:56:23 +0300
From:      Mike Makonnen <mtm@identd.net>
To:        Cyrille Lefevre <clefevre-lists@9online.fr>
Cc:        freebsd-rc@FreeBSD.org
Subject:   Re: localpkg script changes
Message-ID:  <20040716145622.GC10133@rogue.acs-et.com>
In-Reply-To: <017401c4698e$9ea32120$7890a8c0@dyndns.org>
References:  <20040713140354.GA1695@rogue.acs-et.com> <017401c4698e$9ea32120$7890a8c0@dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 14, 2004 at 12:37:52PM +0200, Cyrille Lefevre wrote:
> "Mike Makonnen" <mtm@identd.net> 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 !



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