diff --git a/CHANGELOG.md b/CHANGELOG.md index c466682..9337eeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ #### `scripts/felhom-wipe.sh` - **`cleanup_scan_dir()`**: removes `/mnt/.felhom-scan/` (ephemeral DR scan directory) — called from `full` level onwards. - **`cleanup_raw_mounts()`**: removes raw helper mount infrastructure (`/mnt/.felhom-raw/`) at `nuclear` level: unmounts bind mounts first, then raw mounts, strips fstab entries, removes empty directories. Physical drive data untouched. +- **Bug fix**: `do_soft_wipe()` used `[ -f "$f" ] && rm -f "$f" && info "..."` — with `set -euo pipefail`, when a state file doesn't exist `[ -f ]` returns 1, the whole `&&` chain returns 1, and `set -e` exits the script. Nuclear wipe was silently stopping after removing only the first two state files that existed. Fixed with `if [ -f "$f" ]; then ...; fi`. #### `scripts/README.md` - Hub mode quick start simplified to one-liner diff --git a/scripts/felhom-wipe.sh b/scripts/felhom-wipe.sh index 24ebbbe..65cf078 100644 --- a/scripts/felhom-wipe.sh +++ b/scripts/felhom-wipe.sh @@ -346,7 +346,7 @@ do_soft_wipe() { info "Soft wipe: removing controller state..." local state_files=("$DATA_DIR/settings.json" "$DATA_DIR/metrics.db" "$DATA_DIR/setup-state.json" "$DATA_DIR/update-state.json" "$DATA_DIR/session-data.json" "$DATA_DIR/snapshot-history.json") for f in "${state_files[@]}"; do - [ -f "$f" ] && rm -f "$f" && info " Removed: $f" + if [ -f "$f" ]; then rm -f "$f" && info " Removed: $f"; fi done }