[Nut-upsdev] /sbin/upsdrvctl unable to shutdown UPS due to (unmounted) shared library
Arnaud Quette
aquette.dev at gmail.com
Thu Aug 6 19:50:32 UTC 2009
Hey
2009/8/6 Charles Lepple <clepple at gmail.com>
> On Aug 4, 2009, at 8:59 AM, Michal Hlavinka wrote:
>
> Hi,
>>
>> /sbin/upsdrvctl is used as the near final step in /etc/init.d/halt to
>> command
>> the UPS to shut down power to the computer. On Fedora / Red Hat
>> Enterprise
>> Linux system, /usr can reside on its own partition.
>>
>
> Would it be possible to remount /usr read-only at shutdown?
>
that's a possible local solution, though the best is something generalised
across the distros (a kind of best practice).
Note that this is part of the NUT Packaging Standard (NPS), through the NUT
Packager Guide.
We are currently working with Charles on the doc (including the NPS) and the
website.
For a previous shot:
http://new.networkupstools.org/
http://buildbot.ghz.cc/~buildbot/docs/latest/asciidoc.html
>
> Drivers are linked to several libraries, but some of them lives in
>> /usr/lib
>> and this can be umounted when drivers are used. There are 16 libraries
>> used on
>> Fedora 11 system. This prevents nut to properly shutdown ups.
>>
>
> I think all of the libraries used by the NUT drivers are in /lib on Debian,
> but Arnaud can give you more details.
>
> The 16 libraries might be an upper bound of what is actually being used:
>
>
> https://alioth.debian.org/tracker/index.php?func=detail&aid=311810&group_id=30602&atid=411542
>
upsd + upsmon + upsdrvctl + {serial,usb} drivers must be on / (lib, bin,
sbin)
ie on Debian:
linux-gate.so.1 => (0xb80ac000)
libwrap.so.0 => /lib/libwrap.so.0 (0xb808c000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7f29000)
libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7f0f000)
libupsclient.so.1 => /lib/libupsclient.so.1 (0xb7f07000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f74000)
libusb-0.1.so.4 => /lib/libusb-0.1.so.4 (0xb8081000)
linux-gate.so.1 => (0xb8009000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e8f000)
/lib/ld-linux.so.2 (0xb800a000)
only snmp-ups and netxml-ups have deps outside, but the late shutdown
doesn't apply here.
the same goes for the powerman and CGI parts, which are out of the scope of
such behavior.
as a side note, more and more UPSs are smart nowadays, and provides delayed
shutdown.
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...
>
> How is this designed to work? Is it expected all drivers are linked
>> statically? 16 libraries does not seem to me as unexpectedly placed to
>> /usr/lib instead of /lib
>>
>
> Not sure I understand the "unexpectedly placed" part.
>
>
seconded.
cheers,
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20090806/cbbe86fb/attachment.htm>
More information about the Nut-upsdev
mailing list