Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Provide a different exit code, when timers are pending.
This can be useful, when the shutdown action depends on this condition (e.g. full shutdown or hibernate only)
  • Loading branch information
axmhari committed Apr 9, 2012
1 parent a25761b commit a3cc766
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shutdown.c
Expand Up @@ -136,6 +136,10 @@ void cShutdownHandler::CallShutdownCommand(time_t WakeupTime, int Channel, const
if (!WIFEXITED(Status) || WEXITSTATUS(Status))
esyslog("SystemExec() failed with status %d", Status);
else {
if (WakeupTime) {
isyslog("Preparing standby");
ShutdownHandler.Exit(20);
}
Setup.NextWakeupTime = WakeupTime; // Remember this wakeup time for comparison on reboot
Setup.Save();
}
Expand Down

0 comments on commit a3cc766

Please sign in to comment.