Skip to content

Commit

Permalink
drivers/main.c: report where driver.state changes from init.* to just…
Browse files Browse the repository at this point in the history
… before regular work [networkupstools#1767]
  • Loading branch information
jimklimov committed Jan 5, 2023
1 parent 10be1a9 commit 4afb5e1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1162,8 +1162,14 @@ int main(int argc, char **argv)
writepid(pidfn); /* PID changes when backgrounding */
}

while (!exit_flag) {
dstate_setinfo("driver.state", "quiet");
if (dump_data) {
upsdebugx(1, "Driver initialization completed, beginning data dump (%d loops)", dump_data);
} else {
upsdebugx(1, "Driver initialization completed, beginning regular infinite loop");
}

while (!exit_flag) {
struct timeval timeout;

gettimeofday(&timeout, NULL);
Expand Down

0 comments on commit 4afb5e1

Please sign in to comment.