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

locksmithd will not reboot outside of reboot windows, if no semaphore was acquired before #10

Merged
merged 2 commits into from
Aug 3, 2021

Commits on Jul 14, 2021

  1. Add sleep inside the infinite loop

    Get the period and check if we are inside the reboot window
    or not. If not inside the reboot window then sleep until next
    period and if inside the window then reboot.
    aniruddha2000 committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    5854b83 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2021

  1. Add waitForRebootWindow to sleep till next window

    waitForRebootWindow get the environment variable REBOOT_WINDOW_START and
    REBOOT_WINDOW_LENGTH and check if everything is ok or not. If not then
    return error. If ok then get the next periodic by the ParsePeriodic
    function.
    
    Then check if we are inside the reboot window or not. If we are inside
    the reboot window then it will sleep until the next window and return a
    true. If outside the window then it just return the false.
    
    In the lockAndReboot function we check if it has sleep or not and handle the
    error.
    aniruddha2000 committed Aug 2, 2021
    Configuration menu
    Copy the full SHA
    f70d888 View commit details
    Browse the repository at this point in the history