* Carlos E. R.
On Wednesday, 2008-11-19 at 21:14 -0500, Patrick Shanahan wrote:
post ups.conf, upsd.conf and upsd.users
ups.conf:
[myups] # "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