<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Carlos Rodrigues wrote:
<blockquote
cite="mid:712170070712281104w120d4903iace97c36d0f494d2@mail.gmail.com"
type="cite">
<pre wrap="">On Dec 28, 2007 6:59 PM, Jason Pearce <a class="moz-txt-link-rfc2396E" href="mailto:jason@pearce.org.uk"><jason@pearce.org.uk></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> I have recompiled with the patched megatec.c and have added ignoreoff to my
ups.conf
However, I now receive this error :
/usr/local/ups/bin/megatec_usb -a plexus
Network UPS Tools 2.2.1 - Megatec protocol driver 1.5.9 [megatec_usb]
Carlos Rodrigues (c) 2003-2007
Serial-over-USB transport layer for Megatec protocol driver [megatec_usb]
Andrey Lelikov (c) 2006, Alexander Gordeev (c) 2006-2007, Jon Gough (c)
2007
Fatal error: 'ignoreoff' is not a valid flag for this driver.
Look in the man page or call this driver with -h for a list of
valid variable names and flags.
</pre>
</blockquote>
<pre wrap=""><!---->
Did you replace only the megatec binary? megatec_usb is also rebuilt
when megatec.c changes and should also be replaced if you are copying
manually.
</pre>
</blockquote>
Carlos Rodrigues wrote:
<blockquote
cite="mid:712170070712281104w120d4903iace97c36d0f494d2@mail.gmail.com"
type="cite">
<pre wrap="">On Dec 28, 2007 6:59 PM, Jason Pearce <a class="moz-txt-link-rfc2396E" href="mailto:jason@pearce.org.uk"><jason@pearce.org.uk></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> I have recompiled with the patched megatec.c and have added ignoreoff to my
ups.conf
However, I now receive this error :
/usr/local/ups/bin/megatec_usb -a plexus
Network UPS Tools 2.2.1 - Megatec protocol driver 1.5.9 [megatec_usb]
Carlos Rodrigues (c) 2003-2007
Serial-over-USB transport layer for Megatec protocol driver [megatec_usb]
Andrey Lelikov (c) 2006, Alexander Gordeev (c) 2006-2007, Jon Gough (c)
2007
Fatal error: 'ignoreoff' is not a valid flag for this driver.
Look in the man page or call this driver with -h for a list of
valid variable names and flags.
</pre>
</blockquote>
<pre wrap=""><!---->
Did you replace only the megatec binary? megatec_usb is also rebuilt
when megatec.c changes and should also be replaced if you are copying
manually.
</pre>
</blockquote>
patch -p0 < ../megatec-ignoreoff.diff<br>
patching file drivers/megatec.c<br>
Hunk #4 FAILED at 486.<br>
Hunk #5 FAILED at 799.<br>
2 out of 5 hunks FAILED -- saving rejects to file drivers/megatec.c.rej<br>
<br>
more drivers/megatec.c.rej<br>
***************<br>
*** 472,478 ****<br>
fatalx(EXIT_FAILURE, "Error in \"battvolts\"
parameter.");<br>
}<br>
<br>
- upslogx(LOG_NOTICE, "Overriding battery voltage interval
[%.1fV, %.1fV].", battvolt_empty, battvolt_full);<br>
}<br>
<br>
if (battvolt_empty < 0 || battvolt_full < 0) {<br>
--- 486,492 ----<br>
fatalx(EXIT_FAILURE, "Error in \"battvolts\"
parameter.");<br>
}<br>
<br>
+ upslogx(LOG_NOTICE, "Overriding battery voltage
interval [%.1fV, %.1fV].", battvolt_empty, battvolt_full);<br>
}<br>
<br>
if (battvolt_empty < 0 || battvolt_full < 0) {<br>
***************<br>
*** 785,790 ****<br>
addvar(VAR_VALUE, "ondelay", "Minimum delay before UPS startup
(minutes)");<br>
addvar(VAR_VALUE, "offdelay", "Delay before UPS shutdown
(minutes)");<br>
addvar(VAR_VALUE, "battvolts", "Battery voltages (empty:full)");<br>
<br>
megatec_subdrv_makevartable();<br>
}<br>
--- 799,805 ----<br>
addvar(VAR_VALUE, "ondelay", "Minimum delay before UPS startup
(minutes)");<br>
addvar(VAR_VALUE, "offdelay", "Delay before UPS shutdown
(minutes)");<br>
addvar(VAR_VALUE, "battvolts", "Battery voltages (empty:full)");<br>
+ addvar(VAR_FLAG, "ignoreoff", "Ignore the OFF status reported
by the UPS.");<br>
<br>
megatec_subdrv_makevartable();<br>
}<br>
</body>
</html>