[Nut-upsdev] /sbin/upsdrvctl unable to shutdown UPS due to (unmounted) shared library

Charles Lepple clepple at gmail.com
Fri Aug 7 12:38:36 UTC 2009


On Aug 7, 2009, at 1:50 AM, Michal Hlavinka wrote:

>> upsd + upsmon + upsdrvctl + {serial,usb} drivers must be on / (lib,  
>> bin,
>> sbin)
>
> what about other drivers? if user have specified some driver in  
> config file, then
> this driver is always used, right?

As I understand it, some of the drivers (such as snmp-ups, and the HAL- 
based drivers) cannot shut the UPS down themselves - they only signal  
the computer to shut down.

> for Fedora 11, output of:
>
> for f in `find . -maxdepth 1 -type f -executable `; do echo $f; ldd  
> $f | grep
> /usr ; echo; done

There is a list of USB and serial drivers in drivers/Makefile.am, so I  
suppose we could add a target that calculates library dependencies  
*only* for the drivers that can actually shut the UPS down.

> ./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.



More information about the Nut-upsdev mailing list