[Nut-upsdev] Megatec driver FR: repeat shutdown

Andrey Liakhovets liakh at dol.ru
Sat Jan 17 08:32:18 UTC 2009


In continuation to

Inelt Monolith II 1000 (don't know about LT) actually requires
sending shutdown command twice, with delay of 5 to 8 seconds,
according to my experiments.

The attached patch enables the megatec driver to repeat shutdown
command with configurable delay (cmdrepeat, in milliseconds).
Default cmdrepeat value (=0) keeps the current behaviour,
single shutdown command.

+ the patch + ups.conf below
  driver = megatec
  port = /dev/ttyS0
  cmdrepeat = 5100
works with Inelt Monolith II 1000 on ALT Linux 4.0 Terminal
updated to branch/4.0 ( http://en.altlinux.org/ALT_Linux_4.0 ).

Besides "the old bad" N-Power SVL-600 works with the patch!
(for example, with cmdrepeat = 1500)

Unfortunately this patch is for old version of nut, and is bloated
with some support of minute's fractions for shutdown delay.

FR: Is it possible to have similar functionality in the nut
mainstream code?

Best regards,
Andrey Liakhovets
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nut-2.0.5-my-megatec.patch
Type: application/octet-stream
Size: 5921 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20090117/4ccaf3e0/attachment-0001.obj 

More information about the Nut-upsdev mailing list