docs: steam-machine-iso: one build at a time; vminstallsim.sh passes --defaults options

This commit is contained in:
theupriser committed 2026-09-27 22:00:32 +02:00
1 parent 96cae35c6b
commit 21547dd7bc
2 files changed
+8 -5

No files matched your search

+6 -4
View File
@@ -3,12 +3,14 @@
# who never logged in (no session bus, user systemd or plasmashell) gets
# `steamify.sh --defaults` from /mnt, visibly in a Konsole on the VM's
# desktop. Prints the per-component result lines.
# scripts/vminstallsim.sh [--fresh] --fresh: delete and recreate the user first
# scripts/vminstallsim.sh [--fresh] [--defaults options...]
# --fresh: delete and recreate the user first; the rest goes to
# --defaults (e.g. --skip cec,theme --boot desktop)
# Env: VM_USER / VM_PORT / VM_HOST, SIM_USER (isotest), GUEST_UID (1000).
set -euo pipefail
. "$(dirname "$0")/common.sh"
fresh=""; [[ "${1:-}" == --fresh ]] && fresh=1
{ printf 'u=%q fresh=%q uid=%q\n' "${SIM_USER:-isotest}" "$fresh" "${GUEST_UID:-1000}"; cat << 'REMOTE'
fresh=""; [[ "${1:-}" == --fresh ]] && { fresh=1; shift; }
{ printf 'u=%q fresh=%q uid=%q opts=%q\n' "${SIM_USER:-isotest}" "$fresh" "${GUEST_UID:-1000}" "$*"; cat << 'REMOTE'
mountpoint -q /mnt || sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt
[ -n "$fresh" ] && sudo userdel -r "$u" 2>/dev/null
cat > /tmp/install-sim.sh << SIM
@@ -16,7 +18,7 @@ cat > /tmp/install-sim.sh << SIM
id $u >/dev/null 2>&1 || { sudo useradd -m -G wheel -s /bin/bash $u; echo "$u:$u" | sudo chpasswd; }
echo "$u ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/10-steamify-install-sim >/dev/null
sudo -u $u env -i HOME=/home/$u USER=$u LOGNAME=$u PATH=/usr/local/bin:/usr/bin TERM=xterm \
bash -c 'cd ~ && /mnt/steamify.sh --defaults < /dev/null' 2>&1 | tee /tmp/install-sim.log
bash -c 'cd ~ && /mnt/steamify.sh --defaults $opts < /dev/null' 2>&1 | tee /tmp/install-sim.log
echo "exit: \${PIPESTATUS[0]}" | tee -a /tmp/install-sim.log
sudo rm -f /etc/sudoers.d/10-steamify-install-sim
touch /tmp/install-sim.done