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

Bryan gruvin at gmail.com
Tue Aug 21 22:01:16 UTC 2007


Hi Daniel. Thanks for your reply.

On 21/08/07, Daniel O'Connor <doconnor at gsoft.com.au> wrote:
> Modify /usr/local/etc/rc.d/nut so that nut_poststop looks like..
> nut_poststop() {
>         ${nut_prefix}/libexec/nut/upsdrvctl stop
>
>         if [ -r /etc/killpower ]; then
>                 rm -f /etc/killpower
>                 ${nut_prefix}/libexec/nut/upsdrvctl -v shutdown
>                 if [ $? -ne 0 ]; then
>                         ${nut_prefix}/libexec/nut/mge-shut -k -D -a ups1
>                 fi
>                 sleep 5
>         fi
> }

Err... as per my original email -- I don't actually have any rc.d
scripts for nut to edit --  including (especially) /etc/rc.d/nut.
There are no FreeBSD rc.d scripts in the scripts/ directory included
with the nut v2.x.x distros.

If you can point me to where I can get such scripts (for FreeBSD),
that will change everything. Thanks.

There is a v2.0.4 ports version of nut, which I abandoned because I
couldn't get it working. That has the scripts I think. Now I think
about it, the reason it didn't work carried over to v2.2 as well and
is no fixed. Hmmm. maybe I should just go back and install the port.
Then again, it aint broke and it does work perfectly how I have it
now, so I might just leave it.

Bryan.



More information about the Nut-upsuser mailing list