[Nut-upsuser] FreeBSD rc.d scripts or shutdown howto?

Bryan gruvin at gmail.com
Tue Aug 21 02:03:48 UTC 2007

Hello again.

After an hour of Googling and just not "getting" it, I figured I'd
call upon the list once more...

I am starting upsd, upsmon, etc in my FreeBSD's /etc/rc.local, because
it's easy. BUT... rc.shutdown seems kill off all those processes prior
to excuting my upsdrvctl shutdown command, thereby preventing any ups
communications and yup, the power don't get killed.

rc.shutdown snippet:
[code to run all rc.d stop script here]
# Insert other shutdown procedures here

if [ -f /etc/killpower ]; then
        echo "Killing the power, bye!"
        /usr/local/ups/bin/upsdrvctl shutdown <<< oops, upsd is already dead

        sleep 120


rc.local snippet, for what it's worth:
/usr/local/ups/bin/upsdrvctl start

The distro directory scripts/FreeBSD, where such scripts used to be as
I've read in lots of places, well, it doesn't seem to exist in the
v2.x.x distributions of nut anyway.

Once again -- any help getting this last little bit working would be
hugely appreciated.



More information about the Nut-upsuser mailing list