Re: [opensuse] Attempting (and failing) to use my UPS

* Carlos E. R. <robin.listas@xxxxxxxxxxxxxx> [11-19-08 22:17]:
On Wednesday, 2008-11-19 at 21:14 -0500, Patrick Shanahan wrote:

post ups.conf, upsd.conf and upsd.users


# "BELKIN Active Battery Backup"
driver = megatec_usb -DDD
port = auto
desc = "Local UPS"
# user = root

the other two are not used. As I say, if the driver fails to load, the
script exits and does not start the daemon, so it does not
matter how it is configured.

upsd.conf grants access control and
upsd.users sets permissions for the daemon

I know this for sure, I have done strace on it. And I inserted an "exit"
instruction on the script to make absolutely sure the daemon does not
attempt to start.

The problem is that megatec_usb can not access the USB if run as user. And
the driver controller has harcoded to run it as user. Not configurable.

Yes, I tried "run_as = root", and "... -u root". No difference.

yes, but you are trying to make the daemon run from the control
script. You said that you *could* run the daemon as root. The
daemon is not meant to be ran as user, but the <user> defined in the
upsd.users file. I have defined mine to run as user = upsd and

ps aux | grep ups

upsd 11177 0.0 0.0 7496 3980 ? Ss Nov18 0:04 /usr/lib/ups/driver/newhidups -a myups

Try setting up upsd.users and upsd.conf and run the script direct from
the cl:
/usr/lib/ups/driver/megatec_usb -a myups -u <defined_user>

password = passwd
allowfrom = localhost
actions = SET
instcmds = ALL
upsmon master

my port is set to = auto and I cannot show it with ls, I know that it
is Bus 002 Device 002 as it is shown by lsusb.

Bus 002 Device 002: ID 051d:0002 American Power Conversion Back-UPS Pro 500/1000/1500

I do not know what device that equates to: /dev/???

the _ctl script is not necessary to start it by hand, but you know that.

Just try it. :^)

gud luk,

Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 Photo Album:
Registered Linux User #207535 @
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx