OpenSUSE 12.3 has fully embraced systemd, but to get NUT working correctly now requires some further systemd engineering in addition to the usual NUT configuration files. A new systemd service unit is needed to power off the UPS.

The service unit consists of a new file /etc/systemd/system/ups-delayed-shutdown.service

   [Unit]
   Description=Initiate delayed UPS shutdown
   Before=umount.target
   DefaultDependencies=no

   [Service]
   Type=oneshot
   ExecStart=/usr/lib/ups/driver/upsdrvctl shutdown

   [Install]
   WantedBy=poweroff.target

This service unit should be enabled with root command

   systemctl --system reenable /etc/systemd/system/ups-delayed-shutdown.service

I have tested this setup with 64 bit openSUSE 12.3 and NUT 2.6.5 using an Eaton Ellipse ASR 1500 USBS. 9 seconds after server poweroff, the UPS powers off. When wall power returns the server restarts correctly.

Roger

_______________________________________________
Nut-upsuser mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to