[Nut-upsuser] confusion about shutdown

Jim Klimov jimklimov+nut at gmail.com
Fri Jan 6 14:07:31 GMT 2023


> So I'll have a look at this file being removed on upsd startup, or in our
rc.d scripts for now.

Note: it *is* removed upon `upsmon` startup (any successful one, except for
sending signals `upsmon -c CMD` or querying this file `upsmon -K`).
Also checked that this is a rare path not hardcoded into binaries ;) and
only coming from the config file. Some older scripts and doc examples that
referenced `/etc/killpower` were changed by that PR to use `upsmon -K`
(which assumes the binary and its SO requirements are available) or the
`@POWERDOWNFLAG@` substitution from `configure`'d default instead of exact
string.

Jim


On Fri, Jan 6, 2023 at 2:40 PM Greg Troxel <gdt at lexort.com> wrote:

> On 1/5/23 3:04 PM, Jim Klimov wrote:
> > https://github.com/networkupstools/nut/pull/1762
> > <https://github.com/networkupstools/nut/pull/1762> (and maybe some of
> > other recent PRs) updated quite a bit here and there, including a
> > configure-time option for default POWERDOWNFLAG value (using legacy
> > default still).
> >
> > Distros now have easier time to put it into a tmpfs of their choice that
> > they know will remain mounted.
>
> Thanks - that is helpful.
>
> In general, OS shutdown is tricky business before we add in killpower,
> and with killpower with no delay it is almost impossibly tricky.   I'd
> be a bit scared of assuming ramdisks are still there.
>
> It looks like the FreeBSD port assumes offdelay is long enough (and that
> the UPS will have an offdelay).  It may be that essentially all units
> really do have a delay, and this is ok.
>
> In NetBSD, ramdisks w/o device nodes are unmounted just before swap is
> deconfigured, which is before the place where critical filesystems would
> be made ro.
>
> So I'll have a look at this file being removed on upsd startup, or in
> our rc.d scripts for now.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20230106/8fa060f9/attachment.htm>


More information about the Nut-upsuser mailing list