[Nut-upsuser] Correct shutdown scripts for Ubuntu or Suse
Charles Lepple
clepple at gmail.com
Tue Dec 19 22:19:51 CET 2006
On 12/19/06, Arjen de Korte <nut+users at de-korte.org> wrote:
> pico wrote:
>
> > I would like to switch off my UPS once all upsmon clients have been
> > disconnected from the upsd server, so that when power returns all the
> > hosts connected to the ups will be powered up again.
> >
> > In the documentation it states that I should edit my shutdown scripts to
> > add the command:
> > /usr/local/ups/bin/upsdrvctl shutdown
> >
> > Unfortunately I don't know what file to add the command to.
> > Does anyone know the correct file to edit for both Ubuntu and Suse.
> > If I had to take a guess, I should edit /etc/init.d/halt
> > Is this correct?
>
> I don't know about Unbutu, but from SuSE 10.1 onwards this is being
> dealt with in the installation of the nut package by default. You don't
> need to modify the startup scripts yourself.
I may have made an incorrect assumption based on pico's original post.
If you are installing NUT via the Ubuntu packages, then you should not
have to do anything more than changing a few variables (in
/etc/default/nut; refer to /usr/share/doc/nut/README.Debian for more
Debian/Ubuntu-specific configuration). As Arjen explained for SuSE,
Ubuntu already has changed the scripts in their package.
However, if you are installing from source, you can still use the
startup/shutdown scripts as a guide. I forgot to mention earlier that
you will need to link /etc/init.d/nut into the appropriate shutdown
directory (probably /etc/rc0.d; my Ubuntu box is not on at the
moment).
--
- Charles Lepple
More information about the Nut-upsuser
mailing list