Bug 164531 - final shutdown for USB based UPS's fails
Summary: final shutdown for USB based UPS's fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: nut
Version: 3
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 164524
TreeView+ depends on / blocked
 
Reported: 2005-07-28 15:30 UTC by Alfred Ganz
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: FC5
Clone Of:
Environment:
Last Closed: 2006-04-24 16:54:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Alfred Ganz 2005-07-28 15:30:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050719 Fedora/1.7.10-1.3.1

Description of problem:
At the end of /etc/init.d/halt, a UPS driver program may be called to turn off
the UPS. The driver programs for USB based UPS devices are currently
dynamically linked with libusb.so, which resides in /usr/lib, but /usr has been unmounted at this point.

I have suggested that the driver programs in question be linked statically
with libusb, but have been told that this is not suitable, and to ask that
libusb.so be installed in /lib.

I don't really care how this problem is solved, but in order to make USB based
UPS driver programs work, they must work at the end of /etc/init.d/halt.

Note that in addition to this problem, /etc/init.d/halt needs to delay the
umount of /proc/bus/usb until after the above code. I have filed bug 164524
for this.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.ldd /sbin/newhidups  
2.
3.
  

Additional info:

Comment 1 Fabrice Bellet 2006-02-07 20:48:04 UTC
. I agree with Alfred, that the /etc/init.d/halt script needs some love, when
handling the /etc/killpower case :

. A possible workaround for Alfred's last note, about the missing /proc/bus/usb
usbfs, is to remount it just before issuing the ups shutdown command. In this
case, a "-u root" option must be added to this command, because the usb device
in the usbfs tree is no longer with the right 'nut' group, after remount.

. Another problem with the current script, is that $DEVICE is supposed to
contains a value, but this is not mandatory, if this information is in
/etc/ups/ups.conf instead, and if the $MODEL command is launched with the "-a
<myups>" option. I suggest to use the same invokation than in /etc/init.d/nut : 
/sbin/$MODEL -u root -k $OPTIONS $DEVICE, and to remove the test "-n $DEVICE"
just above.
(btw, what's the purpose of $OPTIONS_HALT here ?, this options is not documented
in /etc/sysconfig/ups)

. The problem is still in FC4, and rawhide.

Comment 2 Than Ngo 2006-04-24 16:54:07 UTC
it's now fixed in FC5 release. Thanks for your report.


Note You need to log in before you can comment on or make changes to this bug.