Hey<br><br><div class="gmail_quote">2009/8/6 Charles Lepple <span dir="ltr"><<a href="mailto:clepple@gmail.com">clepple@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Aug 4, 2009, at 8:59 AM, Michal Hlavinka wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
/sbin/upsdrvctl is used as the near final step in /etc/init.d/halt to command<br>
the UPS to shut down power to the computer. On Fedora / Red Hat Enterprise<br>
Linux system, /usr can reside on its own partition.<br>
</blockquote>
<br></div>
Would it be possible to remount /usr read-only at shutdown?<div class="im"></div></blockquote><div><br>that's a possible local solution, though the best is something generalised across the distros (a kind of best practice).<br>
<br>Note that this is part of the NUT Packaging Standard (NPS), through the NUT Packager Guide.<br>We are currently working with Charles on the doc (including the NPS) and the website.<br>For a previous shot:<br><a href="http://new.networkupstools.org/">http://new.networkupstools.org/</a><br>
<a href="http://buildbot.ghz.cc/~buildbot/docs/latest/asciidoc.html">http://buildbot.ghz.cc/~buildbot/docs/latest/asciidoc.html</a><br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Drivers are linked to several libraries, but some of them lives in /usr/lib<br>
and this can be umounted when drivers are used. There are 16 libraries used on<br>
Fedora 11 system. This prevents nut to properly shutdown ups.<br>
</blockquote>
<br></div>
I think all of the libraries used by the NUT drivers are in /lib on Debian, but Arnaud can give you more details.<br>
<br>
The 16 libraries might be an upper bound of what is actually being used:<br>
<br>
<a href="https://alioth.debian.org/tracker/index.php?func=detail&aid=311810&group_id=30602&atid=411542" target="_blank">https://alioth.debian.org/tracker/index.php?func=detail&aid=311810&group_id=30602&atid=411542</a><div class="im">
<br>
</div></blockquote><div>upsd + upsmon + upsdrvctl + {serial,usb} drivers must be on / (lib, bin, sbin)<br>ie on Debian:<br> linux-gate.so.1 => (0xb80ac000)<br> libwrap.so.0 => /lib/libwrap.so.0 (0xb808c000)<br>
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7f29000)<br> libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7f0f000)<br> libupsclient.so.1 => /lib/libupsclient.so.1 (0xb7f07000)<br> libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f74000)<br>
libusb-0.1.so.4 => /lib/libusb-0.1.so.4 (0xb8081000)<br> linux-gate.so.1 => (0xb8009000)<br> libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e8f000)<br> /lib/ld-linux.so.2 (0xb800a000)<br><br>only snmp-ups and netxml-ups have deps outside, but the late shutdown doesn't apply here.<br>
the same goes for the powerman and CGI parts, which are out of the scope of such behavior.<br><br>as a side note, more and more UPSs are smart nowadays, and provides delayed shutdown.<br>one of my future task, part of the NPS, will be to make this the default, though still permitting the late shutdown. there is even possibly a way to automate this, so that it's transparent to the user...<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
How is this designed to work? Is it expected all drivers are linked<br>
statically? 16 libraries does not seem to me as unexpectedly placed to<br>
/usr/lib instead of /lib<br>
</blockquote>
<br></div>
Not sure I understand the "unexpectedly placed" part.<div><div></div><div class="h5"><br>
</div></div></blockquote><div><br>seconded.<br><br>cheers,<br></div></div>Arnaud<br>-- <br>Linux / Unix Expert R&D - Eaton - <a href="http://www.eaton.com/mgeops">http://www.eaton.com/mgeops</a><br>Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/">http://www.networkupstools.org/</a><br>
Debian Developer - <a href="http://www.debian.org">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.free.fr/">http://arnaud.quette.free.fr/</a><br><br>