02.12.2015 Views

Network UPS Tools User Manual

Network UPS Tools User Manual

Network UPS Tools User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Network</strong> <strong>UPS</strong> <strong>Tools</strong> <strong>User</strong> <strong>Manual</strong> 47 / 84<br />

mkdir -p /chroot/nut/dev<br />

cp -a /dev/null /chroot/nut/dev<br />

Try to start your driver(s) and make sure everything fires up as before.<br />

upsdrvctl -r /chroot/nut -u nutdev start<br />

Once your drivers are running properly, try starting upsd.<br />

upsd -r /chroot/nut -u nutsrv<br />

Check your syslog. If nothing is complaining, try running clients like upsc and upsmon. If they seem happy, then you’re done.<br />

9.6.2 symlinks<br />

After you do this, you will have two copies of many things, like the confpath and the state path. I recommend deleting the real<br />

/var/state/ups, replacing it with a symlink to /chroot/nut/var/state/ups. That will let other programs reference the .pid files without<br />

a lot of hassle.<br />

You can also do this with your confpath and point /usr/local/ups/etc at /chroot/nut/usr/local/ups/etc unless you’re worried about<br />

something hurting the files inside that directory. In that case, you should maintain a master copy and push it into the chroot path<br />

after making changes.<br />

upsdrvctl itself does not chroot, so the ups.conf still needs to be in the usual confpath.<br />

9.6.3 upsmon<br />

This has not yet been applied to upsmon, since it can be quite complicated when there are notifiers that need to be run. One<br />

possibility would be for upsmon to have three instances:<br />

• privileged root parent that listens for a shutdown command<br />

• unprivileged child that listens for notify events<br />

• unprivileged chrooted child that does network I/O<br />

This one is messy, and may not happen for some time, if ever.<br />

9.6.4 Config files<br />

You may now set chroot= and user= in the global section of ups.conf.<br />

upsd chroots before opening any config files, so there is no way to add support for that in upsd.conf at the present time.<br />

A<br />

Glossary<br />

This section document the various acronyms used throughout the present documentation.<br />

NUT<br />

<strong>Network</strong> <strong>UPS</strong> <strong>Tools</strong>.<br />

PDU<br />

Power Distribution Unit.<br />

SCD<br />

Solar Controller Device.<br />

<strong>UPS</strong><br />

Uninterruptible Power Supply.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!