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>
master
Stacy Harper 3 years ago committed by Anjandev Momi
parent 4557aa59b8
commit 11f2777e0f
  1. 3
      scripts/core/sxmo_screenlock.sh

@ -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…
Cancel
Save