From 404d7885f485b28ee90a7478f81a86ea52c67d01 Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Sun, 4 Jan 2026 17:02:28 -0500 Subject: [PATCH] Add PATH hook to sanitize script for pre-built images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensures stegasoo CLI and rpi scripts are in PATH for images created with sanitize-for-image.sh. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- rpi/sanitize-for-image.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rpi/sanitize-for-image.sh b/rpi/sanitize-for-image.sh index 30c2a5d..8ceae11 100755 --- a/rpi/sanitize-for-image.sh +++ b/rpi/sanitize-for-image.sh @@ -315,6 +315,19 @@ if [ -n "$STEGASOO_DIR" ] && [ -f "$STEGASOO_DIR/rpi/stegasoo-wizard.sh" ]; then chmod 644 /etc/profile.d/stegasoo-wizard.sh echo " Installed wizard hook to /etc/profile.d/" + # Add stegasoo to PATH for all users + cat > /etc/profile.d/stegasoo-path.sh <<'PATHEOF' +# Stegasoo CLI and scripts +if [ -d /opt/stegasoo/venv/bin ]; then + export PATH="/opt/stegasoo/venv/bin:$PATH" +fi +if [ -d /opt/stegasoo/rpi ]; then + export PATH="/opt/stegasoo/rpi:$PATH" +fi +PATHEOF + chmod 644 /etc/profile.d/stegasoo-path.sh + echo " Installed PATH hook to /etc/profile.d/" + # Create the first-boot flag touch /etc/stegasoo-first-boot echo " Created /etc/stegasoo-first-boot flag"