[Nut-upsdev] [Nut-upsuser] Plexus UPS 1000V - megatec_usb

Jason Pearce jason at pearce.org.uk
Fri Dec 28 19:07:44 UTC 2007


Carlos Rodrigues wrote:
> On Dec 28, 2007 6:59 PM, Jason Pearce <jason at pearce.org.uk> wrote:
>   
>>  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.
>>     
>
> 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.
>
>   
Carlos Rodrigues wrote:
> On Dec 28, 2007 6:59 PM, Jason Pearce <jason at pearce.org.uk> wrote:
>   
>>  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.
>>     
>
> 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.
>
>   
 patch -p0 < ../megatec-ignoreoff.diff
patching file drivers/megatec.c
Hunk #4 FAILED at 486.
Hunk #5 FAILED at 799.
2 out of 5 hunks FAILED -- saving rejects to file drivers/megatec.c.rej

 more drivers/megatec.c.rej
***************
*** 472,478 ****
                        fatalx(EXIT_FAILURE, "Error in \"battvolts\" 
parameter.");
                }

-           upslogx(LOG_NOTICE, "Overriding battery voltage interval 
[%.1fV, %.1fV].", battvolt_empty, battvolt_full);
        }

        if (battvolt_empty < 0 || battvolt_full < 0) {
--- 486,492 ----
                        fatalx(EXIT_FAILURE, "Error in \"battvolts\" 
parameter.");
                }

+               upslogx(LOG_NOTICE, "Overriding battery voltage interval 
[%.1fV, %.1fV].", battvolt_empty, battvolt_full);
        }

        if (battvolt_empty < 0 || battvolt_full < 0) {
***************
*** 785,790 ****
        addvar(VAR_VALUE, "ondelay", "Minimum delay before UPS startup 
(minutes)");
        addvar(VAR_VALUE, "offdelay", "Delay before UPS shutdown 
(minutes)");
        addvar(VAR_VALUE, "battvolts", "Battery voltages (empty:full)");

        megatec_subdrv_makevartable();
  }
--- 799,805 ----
        addvar(VAR_VALUE, "ondelay", "Minimum delay before UPS startup 
(minutes)");
        addvar(VAR_VALUE, "offdelay", "Delay before UPS shutdown 
(minutes)");
        addvar(VAR_VALUE, "battvolts", "Battery voltages (empty:full)");
+       addvar(VAR_FLAG, "ignoreoff", "Ignore the OFF status reported by 
the UPS.");

        megatec_subdrv_makevartable();
  }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20071228/d825cfb4/attachment.htm 


More information about the Nut-upsdev mailing list