Skip to content

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

@jimklimov

Description

@jimklimov

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Low-hanging fruitA proposal or issue that is good for newcomers to codebase or otherwise a quick winbugservice/daemon start/stopGeneral subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions