sysutils/nut: Add PowerWare bcmxcp_usb driver (#1658)

This commit is contained in:
Michael 2020-02-06 22:58:51 +01:00 committed by GitHub
parent e53652bd3a
commit b8e422b56c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 45 additions and 2 deletions

View file

@ -1,6 +1,5 @@
PLUGIN_NAME= nut
PLUGIN_VERSION= 1.6
PLUGIN_REVISION= 2
PLUGIN_VERSION= 1.7
PLUGIN_COMMENT= Network UPS Tools
PLUGIN_DEPENDS= nut
PLUGIN_MAINTAINER= m.muenz@gmail.com

View file

@ -9,6 +9,10 @@ and management interface.
Plugin Changelog
----------------
1.7
* Add PowerWare bcmxcp_usb driver
1.6
* Add QX driver support

View file

@ -76,6 +76,22 @@
<help>Set extra arguments for this UPS, e.g. "port=auto".</help>
</field>
</subtab>
<subtab id="nut-ups-bcmxcpusb" description="BCMXCPUSB-Driver">
<field>
<id>nut.bcmxcpusb.enable</id>
<label>Enable</label>
<type>checkbox</type>
<help>Enable the PowerWare BCMXCPUSB driver.</help>
</field>
<field>
<id>nut.bcmxcpusb.args</id>
<label>Extra Arguments</label>
<style>tokenize</style>
<type>select_multiple</type>
<allownew>true</allownew>
<help>Set extra arguments for this UPS, e.g. "port=auto".</help>
</field>
</subtab>
<subtab id="nut-ups-blazerusb" description="BlazerUSB-Driver">
<field>
<id>nut.blazerusb.enable</id>

View file

@ -59,6 +59,16 @@
<Required>N</Required>
</args>
</apcsmart>
<bcmxcpusb>
<enable type="BooleanField">
<Required>Y</Required>
<default>0</default>
</enable>
<args type="CSVListField">
<default>port=auto</default>
<Required>N</Required>
</args>
</bcmxcpusb>
<blazerusb>
<enable type="BooleanField">
<Required>Y</Required>

View file

@ -20,6 +20,15 @@ driver=apcsmart
{% endfor %}
{% endif %}
{% endif %}
{% if helpers.exists('OPNsense.Nut.bcmxcpusb.enable') and OPNsense.Nut.bcmxcpusb.enable == '1' %}
[{{ OPNsense.Nut.general.name }}]
driver=bcmxcp_usb
{% if helpers.exists('OPNsense.Nut.bcmxcpusb.args') and OPNsense.Nut.bcmxcpusb.args != '' %}
{% for args in OPNsense.Nut.bcmxcpusb.args.split(',') %}
{{ args }}
{% endfor %}
{% endif %}
{% endif %}
{% if helpers.exists('OPNsense.Nut.blazerusb.enable') and OPNsense.Nut.blazerusb.enable == '1' %}
[{{ OPNsense.Nut.general.name }}]
driver=blazer_usb

View file

@ -16,6 +16,11 @@ MONITOR {{ OPNsense.Nut.general.name }} 1 monuser {{ OPNsense.Nut.account.mon_pa
SHUTDOWNCMD "/usr/local/etc/rc.halt"
POWERDOWNFLAG /etc/killpower
{% endif %}
{% if helpers.exists('OPNsense.Nut.bcmxcpusb.enable') and OPNsense.Nut.bcmxcpusb.enable == '1' %}
MONITOR {{ OPNsense.Nut.general.name }} 1 monuser {{ OPNsense.Nut.account.mon_password }} master
SHUTDOWNCMD "/usr/local/etc/rc.halt"
POWERDOWNFLAG /etc/killpower
{% endif %}
{% if helpers.exists('OPNsense.Nut.blazerusb.enable') and OPNsense.Nut.blazerusb.enable == '1' %}
MONITOR {{ OPNsense.Nut.general.name }} 1 monuser {{ OPNsense.Nut.account.mon_password }} master
SHUTDOWNCMD "/usr/local/etc/rc.halt"