On Debian Stable (NUT 2.7.2-4) the /lib/systemd/system-shutdown/nutshutdown file exists, but it does not work, because /sbin/upsmon -K ALWAYS returns false, even if the flag is there.

Changing

#!/bin/sh
/sbin/upsmon -K >/dev/null 2>&1 && /sbin/upsdrvctl shutdown

to

#!/bin/sh
if [ -f /etc/killpower ]
then /sbin/upsdrvctl shutdown
fi

fixes the problem for me.


See Debian bug #835555:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835555


--
darkpenguin

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

Reply via email to