nut-upsd: Add pollonly option to entrypoint script#265
Open
RyanGWU82 wants to merge 1 commit intoinstantlinux:mainfrom
Open
nut-upsd: Add pollonly option to entrypoint script#265RyanGWU82 wants to merge 1 commit intoinstantlinux:mainfrom
RyanGWU82 wants to merge 1 commit intoinstantlinux:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Adds a new optional environment variable,
POLLONLY, to the Docker image for Network UPS Tools (NUT) . Following the same conventions as other options in the entrypoint script, when set, it appendspollonlyto the generatedups.conf.Closes #264.
Why is this change being made?
pollonlydisables USB interrupt-based reads in favor of direct HID polling, and is particularly useful for CyberPower UPS devices whose HID implementations don't reliably send USB interrupt reports. Without it, theusbhid-upsdriver stalls waiting for reports that never arrive, eventually marking data as stale and causing the UPS to appear offline.How was this tested? How can the reviewer verify your testing?
Tested by building the image directly from the branch using a
docker-compose.ymlwith:To verify independently, a reviewer can build and run the container with
POLLONLYset and inspect the generated config. The output should includepollonlyin the[ups]block.Completion checklist