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

Fix uses of banner_is_disabled() to not preclude -V printouts #2573

Closed
jimklimov opened this issue Aug 1, 2024 · 0 comments · Fixed by #2583
Closed

Fix uses of banner_is_disabled() to not preclude -V printouts #2573

jimklimov opened this issue Aug 1, 2024 · 0 comments · Fixed by #2583
Labels
bug Low-hanging fruit A proposal or issue that is good for newcomers to codebase or otherwise a quick win service/daemon start/stop General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug
Milestone

Comments

@jimklimov
Copy link
Member

Some NUT programs only print the version banner when asked to by -V argument, a few others did so always until it became configurable by an envvar toggle with PR #2568. Their implementations of -V handling were essentially no-ops because the banner is always there.

Now these few programs should be revised to check if the banner was forbidden by default, and re-print it in -V clause handling. It would then help to offload the banner-printing into a method, whether in common or privately per-tool sources.

Also it would be helpful for upsdrvctl status and upsdrvsvcctl status parsing to have a way (envvar or CLI option like -H in Solaris common semantics) to not print the table heading, showing only the content lines. If doing -H, it should also preclude the NUT banner printing (so maybe a quick arg parsing loop to check if H is present, like already done in some other code checking for debug early on).

@jimklimov jimklimov added bug service/daemon start/stop General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug Low-hanging fruit A proposal or issue that is good for newcomers to codebase or otherwise a quick win labels Aug 1, 2024
@jimklimov jimklimov added this to the 2.8.3 milestone Aug 1, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
…programs to describe_NUT_VERSION_once() [networkupstools#2573]

Signed-off-by: Jim Klimov <[email protected]>
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
…ON_once() rather than directly UPS_VERSION [networkupstools#2573]

Signed-off-by: Jim Klimov <[email protected]>
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
…with its copy of describe_NUT_VERSION_once() instead of large code chunk in the program [networkupstools#2573]

Signed-off-by: Jim Klimov <[email protected]>
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
…pass it to print_banner_once() and show_usage() [networkupstools#2573]

Also update tools/nut-scanner/Makefile.am to have the symbols in libnutscan

Signed-off-by: Jim Klimov <[email protected]>
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
jimklimov added a commit to jimklimov/nut that referenced this issue Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Low-hanging fruit A proposal or issue that is good for newcomers to codebase or otherwise a quick win service/daemon start/stop General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug
Projects
None yet
1 participant