mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
dbebec2717
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
43 lines
1.8 KiB
Text
43 lines
1.8 KiB
Text
README.SLACKWARE
|
|
Written by V'yacheslav Stetskevych <slava18 dont_spam_me gmail com>
|
|
|
|
In order to configure Network UPS tools on Slackware you need to rename
|
|
or make copies of the sample config files in /etc/nut and edit them
|
|
to suit your needs. See documentation in /usr/doc/nut-* for reference.
|
|
As you make your new config files, don't forget to secure them:
|
|
chown root:nut /etc/nut/*.conf /etc/nut/*.users
|
|
chmod 640 /etc/nut/*.conf /etc/nut/*.users
|
|
|
|
If you are using a serial-connected UPS, be sure to add the nut user to
|
|
the 'dialout' group:
|
|
usermod -a -G dialout nut
|
|
|
|
A startup script /etc/rc.d/rc.ups is provided with this build.
|
|
You can add these lines to /etc/rc.d/rc.local to launch it on system start:
|
|
if [ -x /etc/rc.d/rc.ups ]; then
|
|
/etc/rc.d/rc.ups start
|
|
fi
|
|
|
|
If you have more than one box sitting on the same UPS, you should only use
|
|
'start' on the one box that is connected to the device using a signal cable.
|
|
On the other boxes, start rc.ups with the 'start_upsmon' parameter to only
|
|
monitor the power status (client mode). Configure access permissions on the
|
|
server box accordingly.
|
|
|
|
If you wish for your UPS to turn off it's power during an extended power outage
|
|
in order not to drain it's battery completely, you should make two simple edits
|
|
to the Slackware shutdown script /etc/rc.d/rc.6 near the end of it.
|
|
These are only needed on the server box, one that is connected to the UPS:
|
|
1) Insert after the rootfs has been remounted read-only:
|
|
if [ -x /usr/libexec/nut/nut_restart_udev ]; then
|
|
. /usr/libexec/nut/nut_restart_udev
|
|
fi
|
|
2) Insert after the genpowerd block and before the actual halt:
|
|
if [ -x /usr/libexec/nut/nut_kill_inverter ]; then
|
|
. /usr/libexec/nut/nut_kill_inverter
|
|
fi
|
|
|
|
Don't forget to set your motherboard BIOS to automatically turn the machine on
|
|
when the power comes back.
|
|
|
|
Have fun!
|