Check for null last boot reason

This commit is contained in:
prpr 2022-09-14 11:03:49 +01:00
parent 66bd753689
commit 805b9ba2dc
1 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,9 @@ lbr=0
if [ -f /tmp/.lbr ]; then
lbr="`cat /tmp/.lbr`"
#echo "LBR: $lbr"
else
[ -z "$lbr" ] && lbr=0
fi
if [ $lbr -eq 0 ]; then
# No last-boot-reason file, fall-back to reading timer directly.
echo "No .lbr, falling back to timer..."
if readwakeup | grep "00 00 00 00"; then