Hai Folks,
today I updated my OMV installation to 0.5.28 (and installed owncloud manually but I think it's not releated to this issue).
I have an APC Back-UPS CS 650 with USB connected to my box. Plug-in version: 0.5.4
Since the update I found that the UPS plugin is not working. Giving the following errors in syslog:
Jan 2 13:55:47 freenas usbhid-ups[1926]: Got disconnected by another driver: Device or resource busy
Jan 2 13:55:47 freenas kernel: [ 1309.672962] usb 4-2: usbfs: process 1926 (usbhid-ups) did not claim interface 0 before use
Jan 2 13:55:47 freenas kernel: [ 1309.673041] usb 4-2: usbfs: process 1926 (usbhid-ups) did not claim interface 0 before use
Jan 2 13:55:50 freenas usbhid-ups[4715]: libusb_get_interrupt: error submitting URB: Device or resource busy
Jan 2 13:55:50 freenas usbhid-ups[4715]: libusb_get_report: error sending control message: Device or resource busy
I found out that the UPS's driver usbhid-ups had 2 processes running at the same time. This caused nut daemon unable to communicate to the driver (usbhid-ups with the lower PID).
After I killed the lower PID process nut could communicate with the driver automatically.
Checking /etc/init.d/nut I found out that the daemon itself starts the driver. (the one with higher PID)
I think the daemons behaviour is fine, but I couldn't find what is starting usbhid-ups driver before /etc/init.d/nut starts. Maybe it has to do something around udev rules?
(reproduce note: If you just install the plug-in from the webgui you win't notice this until you restart OMV.)
As a workaround I edited /etc/init.d/nut to pkill usbhid-ups before starting it but it's not an acceptable solution.
Can somebody say how/where could OMV starts the first instance of usbhid-ups ?