From 2dd243230fb76f360aa8e5b5c815d0cf653f5ffd Mon Sep 17 00:00:00 2001 From: Roland Date: Sun, 13 Oct 2024 14:24:11 -0600 Subject: [PATCH] Adding two MOTD, one for before repair, one that is moved in after repair is successful. --- .../hooks/normal/9999-wrolpi.hook.chroot | 2 ++ etc/raspberrypios/motd | 18 ++++++++++++++ etc/raspberrypios/motd_first | 24 +++++++++++++++++++ pi-gen/stage2/04-wrolpi/03-run-chroot.sh | 2 ++ repair.sh | 3 +++ 5 files changed, 49 insertions(+) create mode 100644 etc/raspberrypios/motd create mode 100644 etc/raspberrypios/motd_first diff --git a/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot b/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot index 36ed8660..48b87e99 100644 --- a/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot +++ b/debian-live-config/config/hooks/normal/9999-wrolpi.hook.chroot @@ -53,6 +53,8 @@ cp /opt/wrolpi/etc/raspberrypios/wrolpi-*.service /etc/systemd/system/ cp /opt/wrolpi/etc/raspberrypios/wrolpi.target /etc/systemd/system/ cp /opt/wrolpi/etc/raspberrypios/renderd.conf /etc/renderd.conf +cp /opt/wrolpi/etc/raspberrypios/motd_first /etc/motd + # NetworkManager for the hotspot. systemctl enable NetworkManager diff --git a/etc/raspberrypios/motd b/etc/raspberrypios/motd new file mode 100644 index 00000000..29829346 --- /dev/null +++ b/etc/raspberrypios/motd @@ -0,0 +1,18 @@ +The programs included with the Debian GNU/Linux system are free software; +the exact distribution terms for each program are described in the +individual files in /usr/share/doc/*/copyright. + +Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent +permitted by applicable law. + +██╗ ██╗██████╗ ██████╗ ██╗ ██████╗ ██╗ +██║ ██║██╔══██╗██╔═══██╗██║ ██╔══██╗ ║ +██║ █╗ ██║██████╔╝██║ ██║██║ ██████╔╝██ +██║███╗██║██╔══██╗██║ ██║██║ ██╔═══╝ ██║ +╚███╔███╔╝██║ ██║╚██████╔╝███████╗██║ ██║ + ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ + + Run the help script to find potential problems: + /opt/wrolpi/help.sh + +Help documentation is available here: /opt/wrolpi-help/docs diff --git a/etc/raspberrypios/motd_first b/etc/raspberrypios/motd_first new file mode 100644 index 00000000..3dd9adbe --- /dev/null +++ b/etc/raspberrypios/motd_first @@ -0,0 +1,24 @@ +The programs included with the Debian GNU/Linux system are free software; +the exact distribution terms for each program are described in the +individual files in /usr/share/doc/*/copyright. + +Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent +permitted by applicable law. + +██╗ ██╗██████╗ ██████╗ ██╗ ██████╗ ██╗ +██║ ██║██╔══██╗██╔═══██╗██║ ██╔══██╗ ║ +██║ █╗ ██║██████╔╝██║ ██║██║ ██████╔╝██ +██║███╗██║██╔══██╗██║ ██║██║ ██╔═══╝ ██║ +╚███╔███╔╝██║ ██║╚██████╔╝███████╗██║ ██║ + ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ + +Welcome to your new WROLPi! Follow the steps below to finish the setup: + + 1. If you have an external drive, mount it to /media/wrolpi + 2. Run the repair script: /opt/wrolpi/repair.sh + 3. Refresh your files in the UI at https://wrolpi.local or https://127.0.0.1 + +Run the help script to find potential problems: + /opt/wrolpi/help.sh + +Help documentation is available here: /opt/wrolpi-help/docs diff --git a/pi-gen/stage2/04-wrolpi/03-run-chroot.sh b/pi-gen/stage2/04-wrolpi/03-run-chroot.sh index 3f11d01a..02e855c0 100755 --- a/pi-gen/stage2/04-wrolpi/03-run-chroot.sh +++ b/pi-gen/stage2/04-wrolpi/03-run-chroot.sh @@ -51,6 +51,8 @@ cp /opt/wrolpi/etc/raspberrypios/wrolpi.target /etc/systemd/system/ # Enable first startup script. systemctl enable wrolpi-first-startup.service +cp /opt/wrolpi/etc/raspberrypios/motd_first /etc/motd + # NetworkManager for the hotspot. systemctl enable NetworkManager diff --git a/repair.sh b/repair.sh index 9aec1ff8..545e096e 100755 --- a/repair.sh +++ b/repair.sh @@ -137,6 +137,9 @@ chown wrolpi:wrolpi /media/wrolpi chown -R wrolpi:wrolpi /home/wrolpi /opt/wrolpi* +# Copy MOTD once the repair has been successful. +cp /opt/wrolpi/etc/raspberrypios/motd /etc/motd + systemctl restart wrolpi-help systemctl start wrolpi.target