Trigger the screenlock daemon on idle screen blanking
This commit is contained in:
1 parent
77d95c715c
commit
5d859d7b11
11 files changed
+382
-12
No files matched your search
@@ -1126,6 +1126,38 @@ if command -v g++ >/dev/null 2>&1 && \
|
||||
fail "host webarchy renderer profile test failed"
|
||||
fi
|
||||
|
||||
echo "[check] Idle blank screenlock wiring..."
|
||||
IDLE_BLANK="$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-idle-blank.sh"
|
||||
IDLE_LOCK="$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-idle-lock.sh"
|
||||
SCREEN_WAKE="$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-screen-wake.sh"
|
||||
UNLOCK_HOOK="$BASE_DIR/overlay/rootfs/usr/share/sxmo/default_hooks/sxmo_hook_unlock.sh"
|
||||
for f in "$IDLE_BLANK" "$IDLE_LOCK" "$SCREEN_WAKE" "$UNLOCK_HOOK"; do
|
||||
if [ ! -x "$f" ]; then
|
||||
fail "${f#$BASE_DIR/} is missing or not executable"
|
||||
fi
|
||||
if ! sh -n "$f" 2>/dev/null; then
|
||||
fail "shell syntax: ${f#$BASE_DIR/}"
|
||||
fi
|
||||
done
|
||||
if ! grep -q '"$LOCK_HELPER" arm' "$IDLE_BLANK" || \
|
||||
! grep -q 'bananarchy-idle-lock.sh' "$IDLE_BLANK" || \
|
||||
! grep -q 'set screenoff' "$IDLE_LOCK"; then
|
||||
fail "idle blanking no longer arms the trusted screenoff lock"
|
||||
fi
|
||||
for f in "$SCREEN_WAKE" "$UNLOCK_HOOK"; do
|
||||
if ! grep -q 'bananarchy-idle-lock.sh' "$f"; then
|
||||
fail "${f#$BASE_DIR/} no longer cancels a pending idle lock on wake"
|
||||
fi
|
||||
done
|
||||
if ! grep -q 'bananarchy-idle-lock.sh' "$BASE_DIR/scripts/apply-bananarchy-overlay.sh"; then
|
||||
fail "apply-bananarchy-overlay.sh no longer installs the idle lock helper"
|
||||
fi
|
||||
if [ -x "$BASE_DIR/scripts/test-idle-blank-lock.py" ] && \
|
||||
command -v python3 >/dev/null 2>&1 && \
|
||||
! "$BASE_DIR/scripts/test-idle-blank-lock.py" >/dev/null 2>&1; then
|
||||
fail "host idle-blank screenlock integration test failed"
|
||||
fi
|
||||
|
||||
if [ "$FAILURES" -ne 0 ]; then
|
||||
echo "[check] $FAILURES check(s) failed."
|
||||
exit 1
|
||||
|
||||
Reference in new issue
Block a user