-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2008-11-19 at 23:32 -0500, Patrick Shanahan wrote:
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
Correct, but the daemon does not start.
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
No, I'm not attempting to run the "daemon". What I was trying to start is the driver. The script starts three programs: 1 - the driver daemon; if it succeeds, then it continues with '2' 2 - the server daemon (aka "the daemon"); if it succeeds, then it continues with '3' 3 - the monitor daemon It fails at '1', and the rest is skipped. User control only affects 2 and 3. Plus, I have inserted an "exit" command to make sure that 2 and 3 do not run.
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
I'll tell you what was the problem in a second :-) ** ups.conf: maxstartdelay = 70 <====== This. [myups] # "BELKIN Active Battery Backup" driver = megatec_usb -DDD port = auto # port=/dev/hiddev0 desc = "Local UPS" That was all! The timeout. The driver is given by default a timeout of 45 seconds, and if it fails, the controller aborts. When the timeout is increased, it succeeds at about 59 seconds. After that, all works. :-) ** hosts.conf: MONITOR myups@localhost "Local UPS" ** upsd.conf: ACL all 0.0.0.0/0 ACL localhost 127.0.0.1/32 ACCEPT localhost REJECT all ** upsd.users: [upsd] password = 123456 allowfrom = localhost upsmon master ** upsmon.conf RUN_AS_USER upsd MONITOR myups@localhost 1 upsd 123456 master And, I have removed the user upsd from groups uucp and daemon. Ie, everything is at default config, except passwords and drivers... and the timeout: that was the problem. Of course, the root problem is why is it so slow. Can you imagine a one minute delay on every boot? - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkkl50AACgkQtTMYHG2NR9UMkwCfUrZTvLw4dkSdbQgPUM2ew3BC va4An1qusziKtllnctpjbi90zhTC+2Lt =B99r -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org