[Nut-upsuser] Introducing `sdcommands` option and `shutdown.default` INSTCMD to all drivers

Jim Klimov jimklimov at gmail.com
Tue Nov 19 21:52:38 GMT 2024


Cheers all,

  With PR https://github.com/networkupstools/nut/pull/2686 I hope to allow
one to configure (a generally comma-separated list of) sdcommands option
with arbitrary INSTCMD values supported by the device-specific part of
driver code (if any). In testing e.g. beeper commands can be used instead
of powering off the load.

It also aliases the call to upsdrv_shutdown() as a shutdown.default for
good measure (similar to driver.killpower but without a failsafe flag, and
not necessarily exiting the driver).

Shutdown implementations of some drivers got reshuffled into newly
supported standard instant commands like shutdown.return or shutdown.stayoff
- sometimes guessing the name (testing wanted). For others, the method code
remains unique (e.g. when return/stayoff is chosen based on OL/OB status).

It started from discussion in issue
https://github.com/networkupstools/nut/issues/2670, about drivers
hard-coding some operations as their late-shutdown implementation -- which
may not be the best fit for a particular supported device model.

Testing would be very welcome; see
https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests
about making a custom build of NUT for experiments (can be run straight
from build workspace):

* non-regression by default

* custom `sdcommands` setting actually working for your device/driver


Thabks in advance,

Jim Klimov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20241119/88bea601/attachment.htm>


More information about the Nut-upsuser mailing list