[arch-general] Do packages built on libusb need rebuilding on libusbx? upsd won't stay connected over usb.

David C. Rankin drankinatty at suddenlinkmail.com
Fri Jun 8 18:21:14 EDT 2012

On 06/08/2012 03:13 PM, David C. Rankin wrote:
> Guys,
>  Update yesterday caused network-ups-tools to fail (upsd). I have 2 x86_64
> servers running upsd. The one I did not update continues to work, but the one I
> updated yesterday does not. So I have a working install to compare to. The
> install that fails -- starts just fine, but then loses communication with the
> ups for some reason:

>   The network-ups-tools wiki mentions that an incorrect state path could cause
> this problem. I checked before updating yesterday and /var/lock and /var/run
> were both proper symlinks before running the filesystem update with --force.

  OK, I've isolated the issue, now how do I solve it. The problem is upsdrvctl
cannot start usbhid-ups anymore. You must manually start 'usbhid-ups -u root'
instead of just calling usbhid-ups. Something in the updates yesterday caused
this issue and I can't figure out what -- need help.

  Further calling 'usbhid-ups -u root' creates the state files under
/var/state/ups to be created as root:root instead of nut:nut which causes the
subsequent calls to upsd and upsmon to fail.

  The init script for upsd has always worked as follows:

                stat_busy "Starting UPSd Daemon"
                /usr/bin/upsdrvctl start &> /dev/null
                [ -z "$PID" ] && /usr/sbin/upsd &>/dev/null
                /usr/sbin/upsmon &>/dev/null
                if [ $? -gt 0 ]; then
                        add_daemon upsd

  However, after whatever changed in the updates, the only way to start upsd is

# /usr/bin/usbhid-ups -u root -a nirvana_ups
# chown nut:nut /var/state/ups/*
# /usr/sbin/upsd
# /usr/sbin/upsmon

  If you try starting usbhid-ups without '-u root', that results in the driver
not being able to fine the UPS giving the error: "No matching HID UPS found",
but giving -u root allows it to find the UPS just fine.

  What could have altered the ability of usbhid-ups to start without the -u root
option? libusbx? filesystem update? Any help would be greatly appreciated. In
the mean time, I can just hack the init script to get it started, but I don't
understand what caused this to be necessary. It's not an upstream issue,
something changed with Arch.... Thanks for any assistance.

David C. Rankin, J.D.,P.E.

More information about the arch-general mailing list