localpkg script changes

Mike Makonnen mtm at identd.net
Fri Jul 16 07:56:06 PDT 2004


On Wed, Jul 14, 2004 at 12:37:52PM +0200, Cyrille Lefevre wrote:
> "Mike Makonnen" <mtm at 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 at identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8  5279 5359 2B82 7CD4 1F55
mtm at FreeBSD.Org| FreeBSD - Unleash the Daemon !


More information about the freebsd-rc mailing list