mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
repair: copy wrolpi/blobs into /opt/wrolpi-blobs on install and upgrade
The image builds (pi-gen, debian-live, Docker) already ship wrolpi/blobs, but a fresh install on existing Debian and an in-place upgrade did not pick up the default Zim. repair.sh runs on both paths (both install scripts and upgrade.sh call it) and already manages /opt/wrolpi-blobs immutability, so copy the committed blobs there -- after the immutable flag is cleared and before it is re-applied. Local copy only, preserving repair.sh's no-internet guarantee. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
19f4958fb5
commit
76aafc5da9
1 changed files with 10 additions and 0 deletions
10
repair.sh
10
repair.sh
|
|
@ -169,6 +169,16 @@ chown wrolpi:wrolpi /media/wrolpi 2>/dev/null || echo "Ignoring failure to chang
|
|||
# Remove immutable flag from blob files before chown (may not exist or may not be set).
|
||||
chattr -i /opt/wrolpi-blobs/* 2>/dev/null || :
|
||||
|
||||
# Ship committed blobs (e.g. the default Zim served by Kiwix when the media dir
|
||||
# has no working zims) into /opt/wrolpi-blobs. repair.sh runs on every install
|
||||
# and upgrade, so this keeps the blobs current there just like the image builds
|
||||
# do. It runs after the immutable flag is cleared above (so existing blobs can
|
||||
# be overwritten) and before immutability is re-applied below.
|
||||
mkdir -p /opt/wrolpi-blobs
|
||||
if [ -d /opt/wrolpi/wrolpi/blobs ] && ls /opt/wrolpi/wrolpi/blobs/* >/dev/null 2>&1; then
|
||||
cp /opt/wrolpi/wrolpi/blobs/* /opt/wrolpi-blobs/
|
||||
fi
|
||||
|
||||
chown -R wrolpi:wrolpi /home/wrolpi /opt/wrolpi*
|
||||
|
||||
# Protect blob files from accidental modification or deletion.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue