Michal Hlavinka
2009-Aug-04 12:59 UTC
[Nut-upsdev] /sbin/upsdrvctl unable to shutdown UPS due to (unmounted) shared library
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. 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. 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 Regards, Michal Hlavinka
Charles Lepple
2009-Aug-06 11:58 UTC
[Nut-upsdev] /sbin/upsdrvctl unable to shutdown UPS due to (unmounted) shared library
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?> 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> 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 /libNot sure I understand the "unexpectedly placed" part.
Charles Lepple
2009-Aug-28 01:29 UTC
[Nut-upsdev] /sbin/upsdrvctl unable to shutdown UPS due to (unmounted) shared library
On Aug 27, 2009, at 10:22 AM, Michal Hlavinka wrote:>> [...] >> >>>> ./usbhid-ups >>>> libusb-0.1.so.4 => /usr/lib64/libusb-0.1.so.4 >>>> (0x00000036fe600000) >>>> libssl.so.8 => /usr/lib64/libssl.so.8 (0x0000003d07000000) >>>> libcrypto.so.8 => /usr/lib64/libcrypto.so.8 >>>> (0x000000379c400000) >>>> libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 >>>> (0x0000003d06c00000) >>>> libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x0000003d06800000) >>>> libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 >>>> (0x00000036f6200000) libkrb5support.so.0 => >>>> /usr/lib64/libkrb5support.so.0 >>>> (0x00000036f5200000) >>> >>> We could do better here. IIRC, the only reason why we link usbhid- >>> ups >>> against OpenSSL is for calculating the hash of a HID descriptor, >>> and that >>> mode does not seem to be used by default (and would never be used at >>> shutdown). That hash calculation could be moved into a file in NUT's >>> common directory. >> >> Michal, >> >> The code that required OpenSSL has been removed from the SVN trunk. >> >> I have not tested this particular patch against 2.4.1, but it should >> apply without much effort: >> >> http://boxster.ghz.cc/projects/nut/changeset/1947 > > Hi Charles, > > this is awesome! Now only libusb makes some trouble, but I think it > should be > in /lib, so I've started negotiating about this with libusb > maintainer for > rhel and fedora.Sounds good.> Does this means openssl was removed completely or only from usbhid- > ups?None of the other drivers use OpenSSL (last I checked), so things should work at shutdown time (since the drivers are invoked directly). upsd and upsc can optionally communicate over SSL, but /usr should be available while upsd is running.