On power failure the system shuts down but doesn't kill the power on UPS. Reproducible: Always Steps to Reproduce: 1. emerge www-apps/nut 2. touch /etc/killpower 3. shutdown -h +0 Actual Results: The shutdown process after remounting root fs read only, doesn't attempt to send shutdown command to UPS. Expected Results: * Remounting remaining filesystems readonly... * Signalling ups driver(s) to kill the load! In /etc/init.d/halt.sh script ups_kill_power function checks for [ -x /sbin/upsdrvctl ] However, the ebuild installs the link to /usr/lib/nut/upsdrvctl in /usr/sbin. This link should be created in /sbin.
I confirm that bug, and it's not alone. Symlink won't work on a separate file system. Also, all drivers are in /usr/lib/nut/* And, if /usr is umounted, even if I copied upsdrvctl to /sbin, it can't powerdown UPS because it can't find my driver (powercom). The only solution I found is : cp /usr/sbin/upsdrvctl /sbin cp -a /usr/lib/nut/ /lib/ and add this option in my /etc/nut/ups.conf : driverpath = /lib/nut Ebuild could use that path, or another, but not a path in /usr that is often on a separate file system from root. I spent a lot of time to find the real problem. Other thing, I had to put that in my /etc/conf.d/local.start : chown nut\:nut /dev/tts/0 chmod 0600 /dev/tts/0 because I couldn't make udev to do it... May be I didn't need it, but I was looking for a solution to my PC powerdown UPS... Sorry for my bad english.
This ain't webapps. Reassigning.
the problem is worse: I use newhidups and it needs libusb, so that file must also exist on non-/usr. and another problem is that /proc/bus/usb has to remain mounted..... I'll try to fit it all in an ebuild, but it'll be difficult to do this "clean"
I submitted the patch in bug #85296
Created attachment 82100 [details, diff] Diff to fix this bug This problem is still present in the 2.0.1_pre4 release. This patch solves it (probabely not in a very clean way)
For the lib move, there is bug #103132. For everything else, I'm commiting the change in a moment.
Fixed in CVS for 2.0.3. I do have one question for shutdowns however. upsdrvctl invokves /lib/nut/$driver -a $UPSNAME -k Does this shut down with shutdown.return or load.off?