On Sun, Feb 6, 2011 at 8:29 AM, Kevin <bakd...@gmail.com> wrote: > I know it's very old code, but if it helps at all I know that this modified > shutdown function in hidups works: > > void upsdrv_shutdown(void) > { > /* XXX: replace with a proper shutdown function > fatalx("shutdown not supported"); */ > > /* 1) set DelayBeforeStartup */ > if (getval ("ondelay")) > ondelay = atoi (getval ("ondelay")); > > /* setvalue(UPS_WAKEDELAY, ondelay); */ /* commented out this line > for APC CS 500 */ > > /* 2) set DelayBeforeShutdown */ > if (getval ("offdelay")) > offdelay = atoi (getval ("offdelay")); > > /* setvalue(UPS_GRACEDELAY, offdelay); */ > setvalue(0xff86007c, 1); /* changed this line for APC CS 500 */ > }
It looks like the only uncommented code which talks to the device is the last line. (The results from the getval() calls do not seem to be used.) APCDelayBeforeReboot maps to 0xff86007c, so Arjen's suggestion to change the 10 to 1 should be equivalent to the setvalue() line at the end. -- - Charles Lepple _______________________________________________ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser