From 9d778d25a50df8e3fc2d3c93bb5f4dd2b7eaee18 Mon Sep 17 00:00:00 2001 From: Roland Date: Sun, 5 Jul 2026 15:34:40 -0600 Subject: [PATCH] repair.sh: refresh the Portable bootstrap script on installed boxes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Boxes installed from the Live USB run /usr/local/sbin/wrolpi-bootstrap.sh at every boot, but nothing ever updated it after image build — fixes to the bootstrap (e.g. Postgres bind-mounts on live boots only) could never reach installed systems. Copy the script (and its unit, if installed) from the repo during repair, which both upgrade.sh and install runs execute. Co-Authored-By: Claude Fable 5 --- repair.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/repair.sh b/repair.sh index 599b6cb6..66ed22fb 100755 --- a/repair.sh +++ b/repair.sh @@ -70,6 +70,17 @@ chmod 0440 /etc/sudoers.d/90-wrolpi # Verify this new file is valid. visudo -c -f /etc/sudoers.d/90-wrolpi +# Update the Portable bootstrap on boxes installed from the Live USB; it is +# otherwise frozen at image-build time. +LIVE_INCLUDES=/opt/wrolpi/debian-live-config/config/includes.chroot +if [ -f /usr/local/sbin/wrolpi-bootstrap.sh ]; then + cp "${LIVE_INCLUDES}/usr/local/sbin/wrolpi-bootstrap.sh" /usr/local/sbin/wrolpi-bootstrap.sh + chmod 0755 /usr/local/sbin/wrolpi-bootstrap.sh + if [ -f /etc/systemd/system/wrolpi-bootstrap.service ]; then + cp "${LIVE_INCLUDES}/etc/systemd/system/wrolpi-bootstrap.service" /etc/systemd/system/wrolpi-bootstrap.service + fi +fi + # Install the systemd services cp /opt/wrolpi/etc/raspberrypios/wrolpi*.service /etc/systemd/system/ cp /opt/wrolpi/etc/raspberrypios/wrolpi-*.timer /etc/systemd/system/