* Carlos E. R.
On Tuesday, 2008-11-18 at 23:57 -0500, Patrick Shanahan wrote:
23:54 wahoo:/home/pat # /usr/lib/ups/driver/upsdrvctl -t start myups Network UPS Tools - UPS driver controller 2.0.4 *** Testing mode: not calling exec/kill exec: /usr/lib/ups/driver/newhidups -a myups
so upsdrvctl merely calls /usr/lib/ups/driver/<driver> to start the process.
Yes, that's correct. But the driver is loaded/run as plain user and it has no permission to access the USB raw, and thus, it fails. When the driver is run as root it works (/usr/lib/ups/driver/megatec_usb -DDD -a myups), but then it can not be daemonized.
At least, that's my current hypothesis.
You have a problem in upsd.conf, which contains "access control data", or upsd.users, which sets permissions for the ups daemon. My ups driver and monitor daemons run as user:upsd, which was created in upsd.users which I quoted in a previous mail in this thread. I have a user: upsd UPS daemon 150 daemon -rw------- 1 upsd root 2559 2008-09-03 21:14 upsd.users from upsd.users: # Network UPS Tools: Example upsd.users # # This file sets the permissions for upsd - the UPS network daemon. # Users are defined here, are given passwords, and their privileges are # controlled here too. Since this file will contain passwords, keep it # secure, with only enough permissions for upsd to read it. # -------------------------------------------------------------------------- # Each user gets a section. To start a section, put the username in # brackets on a line by itself. To set something for that user, specify # it under that section heading. The username is case-sensitive, so # admin and AdMiN are two different users. # # Possible settings: # # password: The user's password. This is case-sensitive. # # -------------------------------------------------------------------------- # # allowfrom: ACL names that this user may connect from. ACLs are # defined in upsd.conf. # # -------------------------------------------------------------------------- # # actions: Let the user do certain things with upsd. # # Valid actions are: # # SET - change the value of certain variables in the UPS # FSD - set the "forced shutdown" flag in the UPS # # -------------------------------------------------------------------------- # # instcmds: Let the user initiate specific instant commands. Use "ALL" # to grant all commands automatically. There are many possible # commands, so use 'upscmd -l' to see what your hardware supports. Here # are a few examples: # # test.panel.start - Start a front panel test # test.battery.start - Start battery test # test.battery.stop - Stop battery test # calibrate.start - Start calibration # calibrate.stop - Stop calibration # # -------------------------------------------------------------------------- # # Example: # # [admin] # password = mypass # allowfrom = admworkstation admhome # actions = SET # instcmds = ALL # [root] password = passwd allowfrom = localhost actions = SET instcmds = ALL # # --- Configuring for upsmon # # To add a user for your upsmon, use this example: # # [monuser] # password = pass # allowfrom = bigserver # # upsmon master (or upsmon slave) # # The matching MONITOR line in your upsmon.conf would look like this: # # MONITOR myups@myhost 1 monuser pass master (or slave) [upsd] password = passwd allowfrom = localhost upsmon master [upsslave] password = password allowfrom = localhost upsmon slave [root] password = passwd allowfrom = localhost upsmon master [root] password = passwd allowfrom = localhost upsmon slave and in upsmon.conf: MONITOR myups@localhost 1 upsd passwd master -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org