[Nut-upsdev] Bug #302338 (genericups: custom configurationthrough ups.conf, not working)

Arjen de Korte nut+devel at de-korte.org
Tue Jan 31 21:52:39 UTC 2006


Charlie Brady schreef:

> OK, and that leads to:
> 
> http://lists.alioth.debian.org/pipermail/nut-upsdev/2005-October/000172.html
> 
> But note that there are two issues in that post, and only one appears to
> be addressed in the patch. The patch adds support for certain CyberPower
> UPSen, but that should not have been necessary - the full custom
> specification in upsd.conf should have worked, shouldn't it?

The latter should have worked, but I believe it never did (ouch!) since
the logic for the parse_input_signals() was wrong. The custom
configuration worked only if you solely used the overrides for the
output signals.

> Or was the patch to CVS different to the CyberPower support patch, and 
> directly addressed the custom config?

The latter. Check out the logic before and after the modification. In
case a user would specify (in ups.conf)

	OL = CTS

'*line' would be set correctly to TIOCM_CTS, but '*val' would be set to
TIOCM_CTS | TIOCM_CD | TIOCM_RNG, while it should have been TIOCM_CTS
only. This is due to the fact that the code determining if one of these
should be included, only looked for the absence of -CTS, -DCD and -RNG.
In the above mentioned example, neither of these is present and it would
add all of their corresponding status bits. Like parse_output_signals()
it should also confirm that CTS, DCD and RNG respectively are present.

Regards, Arjen




More information about the Nut-upsdev mailing list