Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Apr 2019 00:13:32 +0100
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: rcorder, script to be executed last?
Message-ID:  <20190424001332.6c39097d@gumby.homeunix.com>
In-Reply-To: <20190423031127.GA2158@admin.sibptus.ru>
References:  <20190423031127.GA2158@admin.sibptus.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 23 Apr 2019 10:11:27 +0700
Victor Sudakov wrote:

> Dear Colleagues,
> 
> How do I create a rc.d script which would be guaranteed to execute
> last (after all other scripts) on system shutdown? 

Having something like this at the top of the file should do it

# PROVIDE: killpower
# BEFORE: growfs sysctl swap fsck
# KEYWORD: nojail shutdown

There's no absolute guarantee that this wont be obsoleted, but the
chances of all four scripts in the BEFORE line going away, or anything
being added that significantly erodes the 10 second power-down delay,
are small.  

I'm assuming here that "apcupcd --killpower" can be run that late in the
shutdown and doesn't rely on anything that's already been shut down by
an rc script.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190424001332.6c39097d>