Re: rc script: manual stop vs system shutdown

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Fri, 2 Aug 2019 09:39:15 +0300
On 02/08/2019 01:51, Enji Cooper wrote:
> 
>> On Aug 1, 2019, at 11:07, Andriy Gapon <avg_at_freebsd.org> wrote:
>>
>>> 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.
> 
> This is correct.
> 
> The other implemented keyword is ‘nostart’ (iirc). The two in tandem would likely fit your need, minus someone manually starting a script.

They won't, in my opinion.
Not sure if the misunderstanding is on my part or yours.


-- 
Andriy Gapon
Received on Fri Aug 02 2019 - 04:39:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:21 UTC