You are not logged in.

#1 2009-01-20 17:57:17

amadlopes
Member
Registered: 2007-06-28
Posts: 35

[SOLVED] rc.local config: network ups tools

Hi i need help.

I'm trying to config network-ups-tools for a mustek ups and i have to start /usr/bin/upsdrvctl at boot. I edit
rc.local:

#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
/usr/bin/upsdrvctl start
read -t30 -n1

But i get this error:

Network UPS Tools - UPS driver controller 2.2.2
Network UPS Tools 2.2.2 - Megatec protocol driver 1.5.14 [megatec]
Carlos Rodrigues (c) 2003-2008


Unable to open /dev/ttyS0: Permission denied

  Current user id: nut (55)
Serial port owner: root (0)
Serial port group: uucp (14)
     Mode of port: 0660

Things to try:

 - Use another port (with the right permissions)

 - Fix the port owner/group or permissions on this port

 - Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf).
   See upsdrvctl(8) and ups.conf(5).

Fatal error: unusable configuration
Driver failed to start (exit status=1)

I already have done this:

bash-3.2# chmod 0770 /dev/ttyS0
bash-3.2# chown root:nut /dev/ttyS0
bash-3.2#

But on boot i get that error again.
Someone can point me the right direction.

Thanks

Last edited by amadlopes (2009-01-20 19:44:03)

Offline

#2 2009-01-20 18:02:52

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: [SOLVED] rc.local config: network ups tools

A wild guess... may be add user nut to uucp group...


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#3 2009-01-20 18:09:06

amadlopes
Member
Registered: 2007-06-28
Posts: 35

Re: [SOLVED] rc.local config: network ups tools

I don't have a better idea so i'll try it.
thanks

u_no_hu wrote:

A wild guess... may be add user nut to uucp group...

Offline

#4 2009-01-20 18:21:43

amadlopes
Member
Registered: 2007-06-28
Posts: 35

Re: [SOLVED] rc.local config: network ups tools

Now i have an other problem:

this is the message at boot.

/dev/ttyS0 is locked by another process

If i start upsdrvctl on a terminal evrything works but i don't want to start this a boot everytime i reboot.
I'm going to try investigate more. I folow the documentation from home page of the project but it's not working.
If i find more i'll post.

thanks

Last edited by amadlopes (2009-01-20 18:24:03)

Offline

#5 2009-01-20 18:29:25

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: [SOLVED] rc.local config: network ups tools

man lsof


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#6 2009-01-20 19:43:27

amadlopes
Member
Registered: 2007-06-28
Posts: 35

Re: [SOLVED] rc.local config: network ups tools

It gives me that error but it's working.

thanks

Offline

Board footer

Powered by FluxBB