Commit graph

3 commits

Author SHA1 Message Date
18586d3f09 Harden firstboot scripts: POSIX fixes, quoting, offline pkg path
- shell-system.sh: exit → return in sourced module (would kill firstboot)
- maintenance-mode.sh: replace bash += with POSIX concat, fix subshell
  scope in pipe-to-while-read (vdev_status/failed_disks were always
  empty), quote all $POOL_NAME and $disk expansions
- build-vps.sh: portable _sed_i() wrapper for FreeBSD/Linux
- firstboot.sh: set -eu; set USB_PKG_PATH to SHARE/packages so offline
  package repo works after HDD boot (was defaulting to /mnt/media)
- firstboot-vps.sh: remove plaintext password log, check loader.efi
  exists before EFI copy

Integration test: PASS (7/7 modules)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-04 20:04:22 +02:00
8cc7b2dcaf Wire ZFS pool detection into firstboot pipeline (Sam & Claude)
New shell-zfs.sh module: detects existing clawdie pool, presents
boot mode menu (install/upgrade/maintenance/shell). Runs as first
step in firstboot.sh before wizard. Upgrade mode loads existing
.env and skips wizard. Maintenance mode exec's to maintenance-mode.sh.

Also: fix POSIX herestrings in maintenance-mode.sh, fix paren
mismatch in snapshot age calc, add nda (NVMe) to disk detection
patterns across all ZFS scripts for FreeBSD 15.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-04 20:04:22 +02:00
8e280cb40c Merge origin/main: ZFS pool migration, VPS support, Syncoid docs (Sam & Claude)
Resolve conflicts keeping modular shell-*.sh firstboot architecture
from implementation branch. New from main:
- firstboot/zfs-pool-detect.sh, zfs-pool-migrate.sh, maintenance-mode.sh
- vps/ directory (build-vps.sh, migration scripts)
- docs/SYNCOID-SETUP.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-04 20:04:22 +02:00