install.sh bug fixes, autostart cgroup detachment, vault key security #20
Reference in New Issue
Block a user
Delete Branch "unbrot/fedora-OEMDRV:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
install.sh: four bugs fixed during live testing
Free-space start alignment, locale-independent partition creation, correct new-partition detection on disks with gap-numbered partitions, infinite loop on EOF stdin.
Autostart service cgroup detachment
KDE Plasma runs each autostart .desktop entry as a systemd user unit with KillMode=control-group. Long-running daemons started inside the logon script were being killed when logon_script.sh exited. Fixed for gocryptfs (systemd-run --scope), kwalletd6 (systemd-run --scope), Nextcloud Desktop Client and Nextcloud Talk (systemd-run --no-block transient service; --scope left systemd-run itself in the autostart cgroup). Talk also needed Delegate=yes for Electron's zygote.
Security: vault key in memory-only storage
mount_ecrypt_home.sh wrote the IPA KRA vault key to /var/tmp (persistent on-disk). Replaced with ${XDG_RUNTIME_DIR}/IPAVAULTKEY (per-user tmpfs, memory-only, mode 0700, wiped on logout).
Free-space start alignment parted reports free space starting at 0,02 MiB (before the GPT alignment boundary). The collect_free_space awk now rounds the start up to the next whole MiB (ceiling) and enforces a minimum of 1 MiB, then recomputes the usable size from the adjusted start. This prevents parted from being asked to create a partition at 0 MiB, which it cannot do. Locale-independent partition creation The previous `printf 'Yes\n' | parted mkpart` relied on parted accepting an English answer to its alignment-confirmation prompt. On a German-locale system parted asks "Ist dies noch akzeptabel?" and ignores "Yes", causing mkpart to fail. Replaced with `parted -s` (script/non-interactive mode), consistent with every other parted call in the script. Correct new-partition detection on disks with gaps The old heuristic took the highest partition number after partprobe. On a disk where existing partitions are numbered 2/3/4, a new partition in the gap before them receives number 1 — making the old heuristic point at partition 4 (the existing btrfs volume) and subsequently run mkfs.btrfs on it. The new awk matches by start position (OEMDRV_START ± 1 MiB) instead, which is unambiguous regardless of how numbers are assigned. Infinite loop on EOF stdin When the selection while-loop's `read` hits EOF (e.g. stdin exhausted after sudo consumed a piped password), it returns exit code 1 with an empty INPUT, which falls through to "Invalid input." and spins forever. Added `|| { echo; echo "Aborted."; exit 0; }` to all three read calls in the loop. install.md: drop stale install_from_repo.sh reference from title; clarify that REPO_URL/REPO_BRANCH overrides are optional. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>/var/tmp is persistent on-disk storage. The encryption key must never be written to disk, even temporarily. Replaced all occurrences of /var/tmp/IPAVAULTKEY.txt with ${XDG_RUNTIME_DIR}/IPAVAULTKEY, which is a per-user tmpfs directory (/run/user/<UID>) created by systemd-logind: guaranteed memory-only, mode 0700, wiped on logout. Also removed the TODO comment that tracked this exact issue. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>