Commit Graph

9 Commits

Author SHA1 Message Date
Daniel unbrot Pätzold b978771206 confige: source dists defaults to for robustnes
and docs
2026-05-06 09:06:30 +02:00
Daniel unbrot Pätzold 8652131882 inc.sh: use BASH_SOURCE for path resolution; add --missingconfok; fix install.sh sourcing and git pull logic
setup_system.inc.sh: replace $(dirname "$0") with $(dirname "${BASH_SOURCE[0]:-$0}") so
paths resolve correctly whether the file is sourced or executed directly. Add --missingconfok
flag to warn-and-continue instead of prompting+aborting when config is missing. Fix machine_uuid
path (missing ../). Move `source config` into the else branch so it is not reached when
missingconfok skips the exit.

install.sh: source inc.sh instead of executing it as a subprocess so exported variables
(REPO_URL etc.) propagate back to the caller. Fix git-origin conflict handling: when reusing
an existing OEMDRV partition the user has already confirmed they want to keep it, so remove
the "fresh clone / wipe" option entirely. Now always pulls (fetch+checkout) when a git repo
is present; clears and fresh-clones only when no git repo exists on the partition.

basic_pre_script.inc: dot-source inc.sh so INSTALLDOCS and other config vars are available.

config.dist, sync_client_software.sh: rename UPGRADEURL/UPGRADEBRANCH to REPO_URL/REPO_BRANCH
to match the variable names already used in install.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 18:42:12 +02:00
Daniel unbrot Pätzold 9264ca8e92 Relocate dist files, fix path references, and misc script improvements
- Move setup_system.conf.dist to system_setup/config.dist/ and
  skel.tar.zst.dist + pack_skel.sh to system_setup/skel/; config/ now
  holds only gitignored local files
- Fix configure.sh CONF_DIST path (was pointing at non-existent
  config/setup_system.conf.dist)
- Fix skel/pack_skel.sh: remove vestigial source line whose path was
  wrong in both old and new location
- Update error messages in setup_system.inc.sh and
  sync_client_software.sh to reference new dist file location
- Move machine_uuid reading/writing into setup_system.inc.sh so all
  scripts have MACHINEID available; setup_system.conf.dist now uses
  MACHINEID conditionally with a hostname fallback
- sync_client_software.sh: fix && / typo (should be && \) that broke
  the flatpak remote-add → install chain; add network error handling
  after flatpak install; cleanup upgrade logic and chown placement
- Update CLAUDE.md and install.md to reflect new dist file locations

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 13:28:44 +02:00
Brot der Bot 92b5e9c4a6 install.sh: fix four bugs found during live testing
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>
2026-05-01 13:56:34 +02:00
unbrot 1ffa1adafa Test install.sh 2026-04-30 18:06:24 +02:00
unbrot b088a03f88 Describe how to install with testenvironment 2026-04-30 18:01:48 +02:00
unbrot 8263d92b5b Add install_from_repo.sh 2026-04-30 17:16:26 +02:00
unbrot 1f17ef5c2f Update install.md: download script before running with sudo
Process substitution does not survive sudo, so the script must be
downloaded to a temp file first.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 17:15:06 +02:00
unbrot 4d9ec0d356 Moved install-md to top level 2026-04-27 13:45:55 +02:00