|
|
@ -17,13 +17,12 @@ finish() { |
|
|
|
echo "sxmo_rtcwake: going back to crust ($(date))" >&2 |
|
|
|
echo "sxmo_rtcwake: going back to crust ($(date))" >&2 |
|
|
|
sxmo_screenlock.sh crust |
|
|
|
sxmo_screenlock.sh crust |
|
|
|
else |
|
|
|
else |
|
|
|
echo "sxmo_rtcwake: not returning to crust ($(date))" >&2 |
|
|
|
echo "sxmo_rtcwake: returning without crust ($(date))" >&2 |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
exit 0 |
|
|
|
exit 0 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
trap 'finish' TERM INT EXIT |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
blink() { |
|
|
|
blink() { |
|
|
|
while [ "$(sxmo_screenlock.sh getCurState)" != "unlock" ]; do |
|
|
|
while [ "$(sxmo_screenlock.sh getCurState)" != "unlock" ]; do |
|
|
@ -36,6 +35,16 @@ blink() { |
|
|
|
done |
|
|
|
done |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$1" = "--strict" ]; then |
|
|
|
|
|
|
|
shift |
|
|
|
|
|
|
|
#don't run if we're not in crust or not waked by rtc |
|
|
|
|
|
|
|
if ! grep -q crust "$LASTSTATE" || ! grep -q rtc "$UNSUSPENDREASONFILE"; then |
|
|
|
|
|
|
|
exit 0 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trap 'finish' TERM INT EXIT |
|
|
|
|
|
|
|
|
|
|
|
blink & |
|
|
|
blink & |
|
|
|
BLINKPID=$! |
|
|
|
BLINKPID=$! |
|
|
|
|
|
|
|
|
|
|
|