mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 10:51:36 -04:00
numfmt with a negative argument: Under `set -euo pipefail` the upgrade subcommand would die at `numfmt --to=iec ... $headroom_bytes` whenever the new ISO was larger than the headroom — numfmt treats the leading `-` as an option flag, exits non-zero, and the script aborts before printing the descriptive back-up-and-reflash error message just below. Splitting positive and negative cases and feeding numfmt the absolute value fixes it; the eventual error message now actually shows up. Silent umount during sanity check: `umount "$child" 2>/dev/null || true` was swallowing both stderr and the exit code. A busy partition (open file handle from a daemon that auto-opened the USB) would survive the loop, and `cmd_upgrade` would proceed straight to `dd if=<iso> of=<dev>` — writing to a block device whose partition is still mounted, corrupting the filesystem on that partition. Adds a post-loop assertion: re-read MOUNTPOINTS and die with an `lsof` hint if anything is still mounted. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cleanup_orphaned_tags.py | ||
| delete_downloads.py | ||
| delete_similarly_named_videos.py | ||
| dev_build.sh | ||
| find_and_convert_srt_to_vtt.py | ||
| find_and_rename_orphan_video_files.py | ||
| find_corrupt_videos.py | ||
| fix_media_permissions.sh | ||
| generate_certificates.sh | ||
| generate_subtitles.py | ||
| initialize_api_db.sh | ||
| install_debian_12.sh | ||
| install_help_service.sh | ||
| install_protomaps.sh | ||
| install_raspberrypios.sh | ||
| renew_certificates.sh | ||
| reset_api_db.sh | ||
| reset_tags.sh | ||
| reset_virtual_environments.sh | ||
| singlefile_to_archive.py | ||
| start_kiwix_serve.sh | ||
| upgrade.sh | ||
| upgrade_yt-dlp.sh | ||
| wrolpi-usb.sh | ||