rc script: manual stop vs system shutdown

Andriy Gapon avg at FreeBSD.org
Thu Aug 1 18:08:00 UTC 2019


On 01/08/2019 20:30, Enji Cooper wrote:
> On Aug 1, 2019, at 08:53, Rodney W. Grimes <freebsd-rwg at gndrsh.dnsmgr.net> wrote:
> 
>>>
>>> Is it possible in an rc script to distinguish between a manual stop
>>> (e.g., service foo stop) and a stop during a system shutdown (via
>>> rc.shutdown) ?
>>> Are there any marker variables for that?
>>> Or something in the global system state?
>>
>> Not that I can think of, but I like this idea,
>> I am sure that use cases exist.
> 
> Have you looked at:
> keyword: shutdown
> etc?

AFAIK, that keyword only controls whether 'foo stop' is called during
shutdown or not.


-- 
Andriy Gapon


More information about the freebsd-rc mailing list