Kjell,

have you taken a look at that one?

-- Arnaud

2009/1/29 Arjen de Korte <[email protected] <nut%[email protected]>>

> ----- Doorgestuurd bericht van [email protected] -----
>     Datum: Thu, 29 Jan 2009 11:16:06 -0600
>       Van: Danny <[email protected]>
>  Onderwerp: upscode2.c
>       Aan: [email protected]
>
> Hi,
>
> I apologize if you are not the correct person, but I was wanting to
> submit a bug report for the upscode2.c driver but could not find a way
> to do that from the NUT website.
>
> Here is the problem code and what I have noticed in upscode2.c:
>
> void upsdrv_shutdown(void)
> {
>         if (can_upsd && can_uppc) {
>                 upslogx(LOG_EMERG, "Emergency shutdown");
>                 upscsend("UPSD");       /* Set shutdown delay */
>                 upscsend("1");          /* 1 second (lowest possible.
> 0 returns current.*/
>
>                 upslogx(LOG_EMERG, "Shutting down...");
>                 upscsend("UPPC");       /* Powercycle UPS */
>                 upscsend("IJHLDMGCIU"); /* security code */
>         }
>         else {
>                 upslogx(LOG_EMERG, "Shutdown called, but UPS does not
> support it");
>         }
> }
>
>
> The problem is that the if(can_upsd && can_uppc) check was added
> between SVN 408 and SVN 743.  Those variables can_upsd and can_uppc
> get set to 0 (zero) when upscode2 starts and then based on the output
> of the UPCL command to the UPS, they get set to a one if the UPS
> supports those commands.
>
> However, if you call the driver with the -k option to force a
> shutdown, which my shutdown scripts do, it fails because those
> variables are never set, because the routine upsc_commandlist is never
> called.  That is the routine where the output of the UPCL command to
> the UPS is checked to see if the UPS supports those commands.
>
> I noticed that in version 408 those checks didn't exist, but in SVN
> 743 they were added.  I checked NUT 2.0.5 and the upscode2.c driver
> didn't contain those checks and therefore the shutdown for my UPS
> worked properly.  But with version 2.2.2, those checks exist and the
> shutdown doesn't work.
>
> Thanks,
> Danny
> [email protected]
>
>
>
> ----- Einde doorgestuurd bericht -----
>
> _______________________________________________
> Nut-upsdev mailing list
> [email protected]
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
>
_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev

Reply via email to