Skip to content

Commit

Permalink
drivers/main.c: avoid printing upsnotify() warnings when just queryin…
Browse files Browse the repository at this point in the history
…g program versions [networkupstools#2573]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Aug 5, 2024
1 parent 70534b8 commit c8b115c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1939,6 +1939,14 @@ int main(int argc, char **argv)
group_from_cmdline = 1;
break;
case 'V':
/* Avoid the verbose message about
* driver daemon state integration
* with a service management framework
* like systemd, as not too relevant
* to program version reporting here
* (only seen with non-zero debug) */
setenv("NUT_QUIET_INIT_UPSNOTIFY", "yes", 0);

/* just show the version and optional
* CONFIG_FLAGS banner if available */
if (banner_is_disabled()) {
Expand Down

0 comments on commit c8b115c

Please sign in to comment.