Date: Thu, 1 Aug 2019 15:51:25 -0700 From: Enji Cooper <yaneurabeya@gmail.com> To: Andriy Gapon <avg@freebsd.org> 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: <9A2B3CD5-3F67-4268-AB54-C7991CA1BD66@gmail.com> In-Reply-To: <151b0848-0c94-10ad-92db-47c9038e1180@FreeBSD.org> References: <201908011553.x71FrTCd060252@gndrsh.dnsmgr.net> <B4B80699-3A08-4CA9-AC19-59B48CB3CB7E@gmail.com> <151b0848-0c94-10ad-92db-47c9038e1180@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Aug 1, 2019, at 11:07, Andriy Gapon <avg@freebsd.org> wrote: >=20 >> 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: >>=20 >>>>=20 >>>> 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? >>>=20 >>> Not that I can think of, but I like this idea, >>> I am sure that use cases exist. >>=20 >> Have you looked at: >> keyword: shutdown >> etc? >=20 > AFAIK, that keyword only controls whether 'foo stop' is called during > shutdown or not. This is correct. The other implemented keyword is =E2=80=98nostart=E2=80=99 (iirc). The two i= n tandem would likely fit your need, minus someone manually starting a scrip= t. -Enji=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9A2B3CD5-3F67-4268-AB54-C7991CA1BD66>