localpkg script changes

Cyrille Lefevre clefevre-lists at 9online.fr
Wed Jul 14 03:37:56 PDT 2004


"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.

Cyrille Lefevre.
-- 
home: mailto:cyrille.lefevre at laposte.net



More information about the freebsd-rc mailing list