This commit is contained in:
19
live/intake-login.sh
Normal file
19
live/intake-login.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Sourced on autologin on tty1; no system service owns the compositor.
|
||||
[[ "$(tty)" == /dev/tty1 ]] || return 0
|
||||
[[ -z "${WAYLAND_DISPLAY:-}" ]] || return 0
|
||||
export WLR_RENDERER_ALLOW_SOFTWARE=1
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
if [[ ! -w /mnt/intake-data ]]; then
|
||||
printf '\nCS-R Intake: data partition not writable; no scan can be saved.\n' >&2
|
||||
printf 'Press Enter for diagnostic console...'
|
||||
read -r _
|
||||
return 0
|
||||
fi
|
||||
if command -v cage >/dev/null && [[ -x /usr/local/bin/intake-gui ]]; then
|
||||
cage -- /usr/local/bin/intake-gui --data /mnt/intake-data
|
||||
printf '\nGUI exited. You are at the diagnostic terminal (tty1).\n' >&2
|
||||
else
|
||||
printf '\nCage or GUI missing. Attempting controller fallback.\n' >&2
|
||||
/usr/local/bin/intake-controller --data /mnt/intake-data || true
|
||||
fi
|
||||
Reference in New Issue
Block a user