[arch-general] package: network-ups-tools what happened to it?
Guys, Does anybody know what happened to the package "network-ups-tool" that provided UPS monitoring for CyberPower UPSs and others? I've search packages and I've searched AUR, but the only thing found was a very very old 'nutups' package in AUR that hasn't been updated in more than 2 years. I have an old PKGBUILD for network-ups-tools that I have updated to build on Arch, but it is pre systemd and still installs an init script. If network-ups-tools doesn't exists anymore, then what is a good link that describes how to correctly update the pkgbuild so it creates the needed /usr/lib/systemd/system/ entries and sets/loads the correct usbhid driver? If I have a good link/howto, I'll update it and put it in AUR. Thanks. -- David C. Rankin, J.D.,P.E.
On 12/13/2013 09:48 AM, David C. Rankin wrote:
If network-ups-tools doesn't exists anymore, then what is a good link that describes how to correctly update the pkgbuild so it creates the needed /usr/lib/systemd/system/ entries and sets/loads the correct usbhid driver?
Found: https://wiki.archlinux.org/index.php/DeveloperWiki:Systemd Are there any other favorites you guys have used when converting everything to systemd? -- David C. Rankin, J.D.,P.E.
On 13/12/2013 21:01, David C. Rankin wrote:
On 12/13/2013 09:48 AM, David C. Rankin wrote:
If network-ups-tools doesn't exists anymore, then what is a good link that describes how to correctly update the pkgbuild so it creates the needed /usr/lib/systemd/system/ entries and sets/loads the correct usbhid driver? Found:
https://wiki.archlinux.org/index.php/DeveloperWiki:Systemd
Are there any other favorites you guys have used when converting everything to systemd?
Now here's a coincidence. I've just spent a fair part of the last 2 days trying to get NUT working in a new Arch install (2013-12) - it isn't my main system, just trying to understand Arch and systemd so I had a bit of difficulty getting to grips with them. I did not find a great deal of help (on this specific topic) out on the net although there were bits and pieces to be had which finally came together. The package is in the AUR as network-ups-tools and does supply the systemd scripts - I used <yaourt -Sa network-ups-tools> IIRC. The scripts to user are in /usr/lib/systemd/system and after configuring NUT correctly, enabled for reboot with <systemctl enable nut-server.service> and <systemctl start nut-server.service>. The same for nut-monitor.service. Don't try to start nut-driver.service. It is started automatically by the server when needed - so I understand. My UPS is monitored through a serial interface and a problem that did not resolve was the ownership of /dev/ttyS0. Udev (or something) insists on creating the device owned by root and uucp and I could not get around this. Eventually added user ups to the uucp group which solved it rather unsatisfactorily. HTH Bill
On 12/13/2013 11:57 PM, William D Turner wrote:
Now here's a coincidence. I've just spent a fair part of the last 2 days trying to get NUT working in a new Arch install (2013-12) - it isn't my main system, just trying to understand Arch and systemd so I had a bit of difficulty getting to grips with them. I did not find a great deal of help (on this specific topic) out on the net although there were bits and pieces to be had which finally came together. The package is in the AUR as network-ups-tools and does supply the systemd scripts - I used <yaourt -Sa network-ups-tools> IIRC. The scripts to user are in /usr/lib/systemd/system and after configuring NUT correctly, enabled for reboot with <systemctl enable nut-server.service> and <systemctl start nut-server.service>. The same for nut-monitor.service. Don't try to start nut-driver.service. It is started automatically by the server when needed - so I understand. My UPS is monitored through a serial interface and a problem that did not resolve was the ownership of /dev/ttyS0. Udev (or something) insists on creating the device owned by root and uucp and I could not get around this. Eventually added user ups to the uucp group which solved it rather unsatisfactorily. HTH
Bill
Bill, The hotplugging and udev statefile ownership issues are a pain. nut used to work perfectly on Arch, now I have to kludge it to get it to run. I have built it from the git repository, so I have the latest. I ran into the same ownership problems of the files in /var/state/ups that prevented upsd from starting. (perms were root:root, needed root:nut). In order to get nut to start, I just cheated, I just changed /var/state/ups to be setuid/setgid (ok setgid was all that was needed) So with nut stopped, you can do: # chmod 2770 /var/state/ups That will force the pid files and the device interface ownership that will allow upsd to start. I am using the usb (usbhid) driver, so I had to modify the nut-driver.service before the server would start. For some reason on Arch, "upsdrvctl start" fails to find the usb device and crashes. Changing the Execstart to "/usr/sbin/upsdrvctl -u root start <myups_name>" allows it to find the usb device just fine. With /var/state/ups setgid, the nut-server.service starts perfectly. So I was finally able to enable it in systemd to start on boot. I don't know whether the problem with not finding the driver and /var/state/ups file ownership is with Arch or nut. The problem popped up a while back and I'm just getting time to chase it down. I'll let you know what I get back from the nut-devel list. -- David C. Rankin, J.D.,P.E.
participants (2)
-
David C. Rankin
-
William D Turner