Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Aug 2019 09:39:15 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Enji Cooper <yaneurabeya@gmail.com>
Cc:        "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>, freebsd-rc@freebsd.org, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: rc script: manual stop vs system shutdown
Message-ID:  <04e52315-4541-991d-1f12-b0fb030e6594@FreeBSD.org>
In-Reply-To: <9A2B3CD5-3F67-4268-AB54-C7991CA1BD66@gmail.com>
References:  <201908011553.x71FrTCd060252@gndrsh.dnsmgr.net> <B4B80699-3A08-4CA9-AC19-59B48CB3CB7E@gmail.com> <151b0848-0c94-10ad-92db-47c9038e1180@FreeBSD.org> <9A2B3CD5-3F67-4268-AB54-C7991CA1BD66@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 02/08/2019 01:51, Enji Cooper wrote:
> 
>> On Aug 1, 2019, at 11:07, Andriy Gapon <avg@freebsd.org> wrote:
>>
>>> On 01/08/2019 20:30, Enji Cooper wrote:
>>> On Aug 1, 2019, at 08:53, Rodney W. Grimes <freebsd-rwg@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?04e52315-4541-991d-1f12-b0fb030e6594>