Fix rtcwake when there is no cronjob
rtcwake can't take the default value of mnc when there is no cron job cause it is too big. We limit this value to 8 years, a working value. Signed-off-by: Stacy Harper <contact@stacyharper.net> Signed-off-by: Anjandev Momi <anjan@momi.ca>
This commit is contained in:
parent
4557aa59b8
commit
11f2777e0f
1 changed files with 3 additions and 0 deletions
|
@ -131,6 +131,9 @@ elif [ "$1" = "crust" ] ; then
|
|||
|
||||
xset dpms force off
|
||||
suspend_time="$(($(mnc)-10))"
|
||||
if [ "$suspend_time" -gt 268435455 ]; then
|
||||
suspend_time=268435455
|
||||
fi
|
||||
if [ "$suspend_time" -gt 0 ]; then
|
||||
rtcwake -m mem -s "$suspend_time"
|
||||
UNSUSPENDREASON=$(whichWake)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue