Re: PROPOSAL: init file actions
Anthony Towns <firstname.lastname@example.org> writes:
>> stop and restart the service,
> What if the service isn't already running? No op? Start the service?
> Either, depending on what's easier to code?
Start it with a warning. The expected end result is the same that
> What format is this in? Free form, or one of "started" "stopped", or
> something different?
I'd suggest a standardized form, like:
<script-name>: <standardized message>: <optional detail>
> What should the behaviour be if the script is run by an unpriveleged
> user? Fail obscurely, or should scripts check for uid 0?
Fail non-obscurely. "status" should work for users if possible.
> What should happen with environment variables of the owner are weird,
> for example PATH not including /usr/sbin, should the init scripts pass
> that on, or revert them to something reasonable?
Up to the init script? Smart init scripts will use their own path and
environment. Require that or provide a way to set the environment?