USB-AIO für automatische Geräteprüfung
Some checks failed
Tests / test (push) Has been cancelled

This commit is contained in:
2026-10-14 20:14:36 +02:00
commit 81f06cf6b4
40 changed files with 9956 additions and 0 deletions

28
scripts/intake-session.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -Eeuo pipefail
DATA=/mnt/intake-data
mkdir -p "$DATA"
if ! mountpoint -q "$DATA"; then
disk=$(blkid -L INTAKE_DATA || true)
if [[ -z "$disk" ]]; then echo 'FATAL: INTAKE_DATA partition missing. No scan will run.'; exec bash; fi
mount -o rw,nosuid,nodev "$disk" "$DATA" || { echo 'FATAL: cannot mount persistent storage'; exec bash; }
fi
# First boot: provision Inventory config to the persistent data partition.
mkdir -p "$DATA/config"
if [[ -d /etc/csr-intake ]]; then
for f in inventory.json inventory-api-key; do
if [[ -f "/etc/csr-intake/$f" && ! -e "$DATA/config/$f" ]]; then
install -m600 "/etc/csr-intake/$f" "$DATA/config/$f"
fi
done
fi
export XDG_RUNTIME_DIR=/run/pc-intake-runtime
mkdir -p "$XDG_RUNTIME_DIR"
chmod 0700 "$XDG_RUNTIME_DIR"
export WLR_RENDERER_ALLOW_SOFTWARE=1
if command -v cage >/dev/null && [[ -x /usr/local/bin/intake-gui ]]; then
echo "Launching graphical intake station..."
cage -s -- /usr/local/bin/intake-gui --data "$DATA"
echo "Graphical interface exited. Starting terminal fallback." >&2
fi
exec /usr/local/bin/intake-controller --data "$DATA"