Created attachment 239407 [details] Patch PowerChute Network Shutdown (PowerChute) works in conjunction with the UPS Network Management Card (NMC) to provide network-based shutdown of multiple computer systems. In the case of a UPS critical event, the software performs a graceful, unattended system shutdown before the UPS battery is exhausted. The number of protected systems is limited only by the capacity of the UPS. WWW: https://www.apc.com/us/en/product-range/61933-powerchute-network-shutdown/
I just tried to compile it, but it seems that a new version is available and old binary cannot be downloaded anymore? You want to upgrade to 4.4.1, then I can testbuild and can commit it for you.
I found it now here: https://www.apc.com/us/en/product/SFPCNS441/powerchute-network-shutdown-v4-4-1-windows-linux-windows-virtualization-installer-for-nutanix-hyperv-scvmm/?range=61933-powerchute-network-shutdown&selected-node-id=27602445705 I will testbuild it next.
(In reply to Matthias Fechner from comment #1) I probably should have mentioned this in the original comment, but versions newer than 4.4.0 are actually quite broken and APC has made noise about fixing it in 4.4.3, but have not done so yet for platforms other than virtualization. To make things worse, APC puts out multiple version for multiple platforms and as far as I've been able to find, only the Linux version seems to be portable to FreeBSD. If you look under Utilities and Firmware you should be able to find a link for v4.4 titled "PowerChute Network Shutdown v4.4 for Linux x64 (V4.4)" Frankly, APC is a mess. If apcupsd worked with newer SmartUPS models, I wouldn't bother.
For reference, here is the issue affecting 4.4.1: https://community.se.com/t5/APC-UPS-Data-Center-Enterprise/PCNS-v4-4-1-Unable-to-replace-the-Default-PowerChute-SSL/td-p/371658 TL;DR solution suggested by APC is to use version 4.4.0 if custom certificates are needed, which is fairly common for larger installs.
(In reply to Steven Stallion from comment #4) Reading through the solution again, it looks like there could be a path by patching/replacing a library. I could certainly do that if you think that's a better path than just downgrading the port version.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c6b26ffb714d774bb081e32e1176961ed6844eb8 commit c6b26ffb714d774bb081e32e1176961ed6844eb8 Author: Steven Stallion <sstallion@gmail.com> AuthorDate: 2023-01-11 16:33:43 +0000 Commit: Matthias Fechner <mfechner@FreeBSD.org> CommitDate: 2023-01-13 06:34:10 +0000 sysutils/pcns: New port: PowerChute Network Shutdown PR: 268889 sysutils/Makefile | 1 + sysutils/pcns/Makefile (new) | 58 ++++ sysutils/pcns/distinfo (new) | 3 + sysutils/pcns/files/pcns.in (new) | 41 +++ sysutils/pcns/files/pkg-message.in (new) | 20 ++ sysutils/pcns/pkg-descr (new) | 7 + sysutils/pcns/pkg-plist (new) | 524 +++++++++++++++++++++++++++++++ 7 files changed, 654 insertions(+)
I added the port now like it is. If you would like to fine-tune it or update, just create a new PR ;) Thanks for your contribution.
(In reply to Matthias Fechner from comment #7) Sounds good. Thanks again!