Skip to content

sysutils/nut: Add support for any number of any UPS driver#5276

Open
yodaldevoid wants to merge 1 commit intoopnsense:masterfrom
yodaldevoid:nut-refactor-drivers
Open

sysutils/nut: Add support for any number of any UPS driver#5276
yodaldevoid wants to merge 1 commit intoopnsense:masterfrom
yodaldevoid:nut-refactor-drivers

Conversation

@yodaldevoid
Copy link

Important notices
Before you submit a pull request, we ask you kindly to acknowledge the following:

If AI was used, please disclose:

  • Model used: N/A
  • Extent of AI involvement: None

Related issue
Closes #5275 and #5273


Describe the problem
The plugin currently only realistically supports one UPS at a time. It also only supports only one of each driver. Finally it only supports the short list of manually supported drivers, despite the fact that most of them have the exact same options.


Describe the proposed solution
UPSs are now defined in an array field, similar to firewall rules. Each UPS has its own name, driver, port, and additional options. The driver is simply a text field to allow any driver to be entered.

Netclient has been given its own name field as the global UPS name field has been removed.

Validation has been added to ensure that each UPS defined is unique. Validation has also been added to ensure the NUT server is listening on a loopback address when local UPSs are defined. Finally, if NUT is set to netclient mode a warning has been added to alert the user that any local UPS definitions (a.k.a. anything other than netclient) will be disabled.


@Monviech Monviech requested a review from mimugmail March 1, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

systutils/nut: Support any arbitrary driver

1 participant