aboutsummaryrefslogtreecommitdiff
path: root/net/nut/files/nut-server.init
Commit message (Collapse)AuthorAge
* nut: add cable type nut driver configRob J. Epping2022-05-13
| | | | | | | | | | at least driver apcsmart-old (maybe more) allow for specifying the type of cable used. My old UPS does will not function when cable type is not specified. This will add support for configuration option 'cable' Signed-off-by: Rob J. Epping <epping@renf.us>
* nut: Add the option to compile Nut NetXML drivers with the Nut package.Seb Belcher2021-09-23
| | | | | | Also modifies the nut-server init script to include options specific to the netxml driver. Signed-off-by: Seb Belcher <sdjbelcher@gmail.com>
* nut: fix _ handlingRosen Penev2020-09-19
| | | | | | Taken from https://github.com/openwrt/packages/issues/13359 Signed-off-by: Rosen Penev <rosenp@gmail.com>
* nut: fix other/otherflag custom variables in nut-server.initMatt Merhar2020-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows custom config parameters to be added to the generated config files, enabling the original intended functionality per https://openwrt.org/docs/guide-user/services/ups/software.nut. Example usage from /etc/config/nut_server: config driver 'apc' option driver 'snmp-ups' option snmp_version 'v3' option port '172.16.100.5' list other 'secLevel' list other 'secName' list other 'authPassword' list otherflag 'notransferoids' config other 'other_secLevel' option value 'authNoPriv' config other 'other_secName' option value 'some_username' config other 'other_authPassword' option value 'some_password' config other 'otherflag_notransferoids' option value '1' Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
* nut: initscripts hotplug: Fix many small semantic issuesDaniel F. Dickinson2019-01-20
| | | | | | | | Small but important tweaks to fix the operation of the nut initscripts and hotplug scripts. All hail shellcheck and proofreading and dogfooding. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: Fix procd crashloop no interfacesDaniel F. Dickinson2019-01-07
| | | | | | | Fix a crashloop under procd when attempting to bind to any address when no interfaces are yet available. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: really run upsd as non-rootDaniel F. Dickinson2018-12-23
| | | | | | | | | | | One local removal was missed in last push of this fix, so in certain circumstances upsd would run as root even when it shouldn't. Fixes f48b060fa752 ("nut: Fix upsd runs as root") Closes: #6697 (properly) Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: Fix additional (other) variable handlingDaniel F. Dickinson2018-12-20
| | | | | | | | | | There was a cut & paste error in the handling of 'other' variables (i.e. driver variables not specifically known to the package but which some users may require to be add). There was also a logic error from not switching sufficient after cut & paste. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: Remove extraneous config readsDaniel F. Dickinson2018-12-20
| | | | | | | | Handling of driver variable defaults, overrides, and additional (other) variables changed and left behind some extraneous config reads (config_get and config_list_foreach). Remove those. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: alphabetize driver optionsDaniel F. Dickinson2018-12-20
| | | | | | | There are a lot of options; to make development easier alphabetize them. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: Fix upsd runs as rootDaniel F. Dickinson2018-12-06
| | | | | | | | | | Closes #6997 - Allows upsd to runas a non-privileged user. If any driver is running as non-privileged user, the last driver's user will be used as the server non-privileged user, otherwise the user specified in config upsd, otherwise nut. Previously the localisation of RUNAS variable was in the wrong locations. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: Fix a typo in setting a driver parameterDaniel F. Dickinson2018-12-06
| | | | | | synchronous would not get set due to typo. Fixed. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: Fix extraneous config_getDaniel F. Dickinson2018-11-19
| | | | | | nut-server initscript had a duplicate config_get statepath, so remove it Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: Fix variables for NUT driversDaniel F. Dickinson2018-11-19
| | | | | | | | | Avoid specifying variables that are not specificy set in order to avoid breaking drivers for which those variables do not exist. Closes: #7096. As part of these fixes make sure we have all the variables we need. Closes: #7001. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: Various startup fixes for monitor and serverDaniel F. Dickinson2018-11-19
| | | | | | | Various path and permissions fixes to properly allow nut-server and nut-monitor to start properly. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: Use quotes around filenamesDaniel F. Dickinson2018-08-29
| | | | | | | Avoid potential issues with space or other strangeness by quoting filenames through the initscripts. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* nut: Reorganize nut-server to clarify nut-driverDaniel F. Dickinson2018-08-29
| | | | | | | | | | | | | | | | | | Clarify the different between the common nut-driver portions of nut-server and the nut-server (upsd) proper. nut-driver can't be used without nut-server so there is no compelling reason to split into a separate package, but the reorganization makes such a move easier and makes it clear what each bit is for. While we continue to use a single initscript, it's a properly procdified one which handles the upsd daemon as a different instance than the driver instances. This resolves a race condition in which upsd and drivers fail to start do to a degree of interdepedence. Also properly 'procd'ifies the nut-server initscript. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* net/nut: Fix '/var/run' world readable warningDaniel Dickinson2017-01-11
| | | | | | | | Use /var/run/nut as statepath and set appropriate owner and permissions on /var/run/nut in order to avoid pidfile for nut being world-readable. Signed-off-by: Daniel Dickinson <lede@cshore.thecshore.com>
* net/nut: Build optional separate packages and ucifyDaniel Dickinson2017-01-11
| | | | | | | | | | | | | With a LuCI app (of which I have one written) ucification makes sense (and is in fact needed), so ucify the initscripts. Also, rather than making selection of things to include an image a matter of selecting compile-time config options, make optional things into seperate packages that are built in default builds, and leave selection of what to include or not up to the user (e.g. using ImageBuilder, or adding packages via opkg). Signed-off-by: Daniel Dickinson <lede@cshore.thecshore.com>
* nut: New package for Network UPS ToolsMarty R2014-10-15
An older version of nut is in oldpackages. This commit is based on that package and bumps the version to the latest release along with unifying the server and client packages. More build options are provided for any custom configuration but the defaults provide a working client and server install which only needs a UPS driver. Drivers still build as individual packages to minimise bloat. SSL support has also been added. Signed-off-by: Martin Rowe <cyanidium@users.noreply.github.com>