From 23acd8a8c2600c8d634f32e180bd74b60290f81a Mon Sep 17 00:00:00 2001 From: Anjandev Momi Date: Tue, 6 Jul 2021 22:13:24 -0400 Subject: [PATCH] magic number: make 8 years in seconds a constant --- scripts/core/sxmo_screenlock.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/core/sxmo_screenlock.sh b/scripts/core/sxmo_screenlock.sh index f02b9fc..0e9bc3c 100755 --- a/scripts/core/sxmo_screenlock.sh +++ b/scripts/core/sxmo_screenlock.sh @@ -131,8 +131,10 @@ elif [ "$1" = "crust" ] ; then xset dpms force off suspend_time="$(($(mnc)-10))" - if [ "$suspend_time" -gt 268435455 ]; then - suspend_time=268435455 + + YEARS8_TO_SEC=268435455 + if [ "$suspend_time" -gt "$YEARS8_TO_SEC" ]; then + suspend_time="$YEARS8_TO_SEC" fi if [ "$suspend_time" -gt 0 ]; then rtcwake -m mem -s "$suspend_time"