Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce sdcommands option and shutdown.default INSTCMD to all drivers #2686

Open
wants to merge 87 commits into
base: master
Choose a base branch
from

Commits on Nov 18, 2024

  1. Configuration menu
    Copy the full SHA
    f6eb991 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ccddee5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4cf357a View commit details
    Browse the repository at this point in the history
  4. drivers/adelsystem_cbi.c: update to use "sdcommands" and move logic f…

    …rom upsdrv_shutdown() to upscmd("shutdown.stayoff") [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    aa08ae5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e775b01 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1286775 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f8da375 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b8fb714 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c18e0aa View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ac1b463 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    cd19aa9 View commit details
    Browse the repository at this point in the history
  12. drivers/belkin.c: update to use "sdcommands" and move logic from upsd…

    …rv_shutdown() to upscmd("shutdown.return") [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    14a62df View commit details
    Browse the repository at this point in the history
  13. drivers/belkinunv.c: update to use "sdcommands" (if customized by use…

    …r); revise warning message [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    2ab7f2c View commit details
    Browse the repository at this point in the history
  14. drivers/bestfcom.c: update to use "sdcommands" and move logic from up…

    …sdrv_shutdown() to upscmd("shutdown.return"); newly support INSTCMD at all [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    b0d683a View commit details
    Browse the repository at this point in the history
  15. drivers/bestfortress.c: update to use "sdcommands" and move logic fro…

    …m upsdrv_shutdown() to upscmd("shutdown.return") [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    675db77 View commit details
    Browse the repository at this point in the history
  16. drivers/bestuferrups.c: update to use "sdcommands" and move logic fro…

    …m upsdrv_shutdown() to upscmd("shutdown.return"); newly support INSTCMD at all [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    5fe1576 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    fd42c1b View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    465552c View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    4230032 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    e738dbc View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    fd6b951 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    e79cdea View commit details
    Browse the repository at this point in the history
  23. drivers/etapro.c: update to use "sdcommands" and move logic from upsd…

    …rv_shutdown() to upscmd("shutdown.return") [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    34b24b6 View commit details
    Browse the repository at this point in the history
  24. drivers/gamatronic.c: update to use "sdcommands" and move logic from …

    …upsdrv_shutdown() to upscmd("shutdown.return"); newly support INSTCMD at all [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    80d583d View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    37af651 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    889c77e View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2024

  1. drivers/generic_modbus.c: update to use "sdcommands" and move logic f…

    …rom upsdrv_shutdown() to upscmd("shutdown.stayoff") [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    37d51c4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d16a41a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dea5b93 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2377d06 View commit details
    Browse the repository at this point in the history
  5. drivers/isbmex.c: update to use "sdcommands" and move logic from upsd…

    …rv_shutdown() to upscmd("shutdown.stayoff"); newly support INSTCMD at all [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    fb89803 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fceaa02 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e6c5f05 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a594018 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3392211 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ac118f4 View commit details
    Browse the repository at this point in the history
  11. drivers/masterguard.c: update to use "sdcommands" and move logic from…

    … upsdrv_shutdown() to upscmd("shutdown.return"); newly support INSTCMD at all [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    6ad244c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    360a6b7 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    9e89bd1 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ae2ae3a View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    3f6b070 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    3c16437 View commit details
    Browse the repository at this point in the history
  17. drivers/nutdrv_atcl_usb.c: update to use "sdcommands" and move logic …

    …from upsdrv_shutdown() to upscmd("shutdown.stayoff"); newly support INSTCMD at all [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    30b6a16 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    9758ee0 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    699311f View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    c76f864 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    14fa750 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    ecd5bc9 View commit details
    Browse the repository at this point in the history
  23. drivers/pijuice.c: update to use "sdcommands" and move logic from ups…

    …drv_shutdown() to upscmd("shutdown.stayoff"); newly support INSTCMD at all [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    a74c8e9 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    0a92a24 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    bcf91c7 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    d5d5dcb View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    705e4f7 View commit details
    Browse the repository at this point in the history
  28. drivers/richcomm_usb.c: update to use "sdcommands" and move logic fro…

    …m upsdrv_shutdown() to upscmd("shutdown.return"); newly support INSTCMD at all [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    2c144c6 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    4c5d3c3 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    964d740 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    7a7aea1 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    fc8cc45 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    7355b93 View commit details
    Browse the repository at this point in the history
  34. drivers/*.c: for networked drivers (snmp, netxml, IPMI, modbus/TCP) c…

    …omment in upsdrv_shutdown() some limitations of the media that networked UPS-shutdown may not be generally possible in an endgame [#2770]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    a0fe95c View commit details
    Browse the repository at this point in the history
  35. drivers/snmp-ups.c: update to use "sdcommands" (if customized by user…

    …), by default chain the originally used sequence in upsdrv_shutdown() [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    55bf0c0 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    23fd46f View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    349d421 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    ac93000 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    57f7d07 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    db20fcc View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    1908ca6 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    a0fcfac View commit details
    Browse the repository at this point in the history
  43. drivers/usbhid-ups.c: update to use "sdcommands" (if customized by us…

    …er), by default chain the originally used sequence in upsdrv_shutdown() [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    3fb5481 View commit details
    Browse the repository at this point in the history
  44. include/common.h, docs/new-drivers.txt, NEWS.adoc: define common EF_E…

    …XIT_FAILURE and EF_EXIT_SUCCESS for set_exit_flag(int) methods [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    3612f7a View commit details
    Browse the repository at this point in the history
  45. drivers/*.c: use common EF_EXIT_FAILURE and EF_EXIT_SUCCESS arg value…

    …s for set_exit_flag(int) methods [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    33d3b21 View commit details
    Browse the repository at this point in the history
  46. drivers/*.c, drivers/main.h: introduce and use a common handling_upsd…

    …rv_shutdown flag to exit or not after upsdrv_shutdown() and individual power-state related INSTCMDs [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    2b79651 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    a25e052 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    2d9926d View commit details
    Browse the repository at this point in the history
  49. drivers/main.{c,h}, docs: introduce shutdown.default INSTCMD concep…

    …t and upsdrv_shutdown_default() shared method [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    cc55e5a View commit details
    Browse the repository at this point in the history
  50. drivers/main.c: update some comments

    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    7d98b52 View commit details
    Browse the repository at this point in the history
  51. drivers/main.c: implement INSTCMD "shutdown.default" as a way to call…

    … upsdrv_shutdown() in any driver [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    7b52ab9 View commit details
    Browse the repository at this point in the history
  52. drivers/main.c: do_loop_shutdown_commands(): shortcut for "shutdown.d…

    …efault" support [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    59acc68 View commit details
    Browse the repository at this point in the history
  53. drivers/main.{c,h}: rename upsdrv_shutdown_default() => upsdrv_shutdo…

    …wn_sdcommands_or_default() less ambiguously [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    40a0212 View commit details
    Browse the repository at this point in the history
  54. drivers/main.{c,h}: call upsdrv_shutdown_sdcommands_or_default() not …

    …default upsdrv_shutdown() as the implementation of forceshutdown() and "driver.killpower" INSTCMD (e.g. via `drivername -k`) [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    00b291a View commit details
    Browse the repository at this point in the history
  55. drivers/main.{c,h}, drivers/dstate.c: introduce main_instcmd_fallback…

    …() so drivers might implement their own "shutdown.default" at will [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    25250b0 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    17cf2da View commit details
    Browse the repository at this point in the history
  57. drivers/main.c: update some comments [networkupstools#2670]

    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    a94bc83 View commit details
    Browse the repository at this point in the history
  58. drivers/*.c: simplify upsdrv_shutdown() back, as only "shutdown.defau…

    …lt" implementations again [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    be0a35a View commit details
    Browse the repository at this point in the history
  59. drivers/main.c: move do_forceshutdown handling to be after upsdrv_ini…

    …tinfo() where we register INSTCMD handlers [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    d0b42c4 View commit details
    Browse the repository at this point in the history
  60. Revert "drivers/main.{c,h}, drivers/dstate.c: introduce main_instcmd_…

    …fallback() so drivers might implement their own "shutdown.default" at will [networkupstools#2670]"
    
    This reverts commit 25250b0:
    too messy in logs where driver.instcmd() think they are last in stack.
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    fbef5c5 View commit details
    Browse the repository at this point in the history
  61. drivers/main.c: do_loop_shutdown_commands(): handle "shutdown.default…

    …" as upsdrv_shutdown() in main loop too [networkupstools#2670]
    
    Signed-off-by: Jim Klimov <[email protected]>
    jimklimov committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    1d92ded View commit details
    Browse the repository at this point in the history