Fix SSH choice and image build safeguards

This commit is contained in:
Storm Dragon
2026-07-17 00:12:40 -04:00
parent da26909527
commit b2d6cdc25d
4 changed files with 42 additions and 6 deletions
+3 -2
View File
@@ -29,9 +29,10 @@ The script is designed for an x86_64 Arch host so it can emulate ARM binaries wi
## Building Your First Image ## Building Your First Image
1. Become root (`sudo -i`) so the script can create loop devices and mount them. 1. Become root (`sudo -i`) so the script can create loop devices and mount them.
2. From `/path/to/stormux`, run: 2. From the Pi builder directory, run:
```bash ```bash
sudo ./pi4/build/build-stormux.sh -l en_US -s 8 cd /path/to/stormux/pi4/build
sudo ./build-stormux.sh -l en_US -s 8
``` ```
- The builder creates an aarch64 image for Raspberry Pi 4/5-class systems. - The builder creates an aarch64 image for Raspberry Pi 4/5-class systems.
- `-l en_US` selects the locale (use `es_ES`, `fr_FR`, etc.). - `-l en_US` selects the locale (use `es_ES`, `fr_FR`, etc.).
+32
View File
@@ -236,6 +236,38 @@ if [ "$(whoami)" != "root" ] ; then
exit 1 exit 1
fi fi
# Refuse to mount the image over an unrelated filesystem already using /mnt.
if ! command -v mountpoint > /dev/null 2>&1; then
echo "Error: mountpoint is required to verify that /mnt is available."
exit 1
fi
if [[ ! -d /mnt || ! -w /mnt ]]; then
echo "Error: /mnt is missing or not writable. Please create or fix permissions."
exit 1
fi
if mountpoint -q /mnt; then
if [[ -t 0 ]]; then
read -rp "/mnt is already mounted. Unmount it to continue? [y/N] " answerText
case "$answerText" in
y|Y|yes|YES)
if ! umount /mnt; then
echo "Error: Failed to unmount /mnt."
exit 1
fi
;;
*)
echo "Error: Refusing to proceed while /mnt is mounted."
exit 1
;;
esac
else
echo "Error: /mnt is already mounted. Refusing to proceed in non-interactive mode."
exit 1
fi
fi
# make sure the needed tools are installed # make sure the needed tools are installed
if [[ "$(uname -m)" == "x86_64" ]]; then if [[ "$(uname -m)" == "x86_64" ]]; then
if ! pacman -Q qemu-user-static &> /dev/null ; then if ! pacman -Q qemu-user-static &> /dev/null ; then
+2 -2
View File
@@ -86,7 +86,7 @@ The Stormux repository key is also embedded in the ISO at `/usr/share/stormux/st
- **Fenrir screen reader** starts automatically (not speakup) - **Fenrir screen reader** starts automatically (not speakup)
- **Pipewire audio** properly initialized before Fenrir starts - **Pipewire audio** properly initialized before Fenrir starts
- **Speech-dispatcher** integration for speech synthesis - **Speech-dispatcher** integration for speech synthesis
- GRUB plays an audible tune on boot for accessibility - The UEFI systemd-boot menu enables its audible beep
- Boot menu defaults to accessible entry - Boot menu defaults to accessible entry
- Service startup order ensures audio is ready before screen reader - Service startup order ensures audio is ready before screen reader
- First-login live-environment setup calibrates volume, checks networking and time, then offers to run the installer - First-login live-environment setup calibrates volume, checks networking and time, then offers to run the installer
@@ -165,7 +165,7 @@ Edit `packages.x86_64` and add package names (one per line).
### Modifying Boot Configuration ### Modifying Boot Configuration
- BIOS: Edit `syslinux/archiso_sys-linux.cfg` - BIOS: Edit `syslinux/archiso_sys-linux.cfg`
- UEFI: Edit `grub/grub.cfg` - UEFI: Edit `efiboot/loader/loader.conf` and entries under `efiboot/loader/entries/`
### Adding Overlay Files ### Adding Overlay Files
@@ -1786,7 +1786,6 @@ systemctl enable NetworkManager.service
systemctl enable brltty.path systemctl enable brltty.path
systemctl enable fenrirscreenreader.service systemctl enable fenrirscreenreader.service
systemctl enable cronie.service systemctl enable cronie.service
systemctl enable ssh-login-monitor.service
# Enable bluetooth if present # Enable bluetooth if present
if ! systemctl enable bluetooth.service; then if ! systemctl enable bluetooth.service; then
@@ -1795,8 +1794,12 @@ fi
# Enable SSH if requested # Enable SSH if requested
if [[ "${enableSsh}" == "yes" ]]; then if [[ "${enableSsh}" == "yes" ]]; then
systemctl enable sshd.service systemctl enable sshd.service ssh-login-monitor.service
echo "SSH server enabled" echo "SSH server enabled"
else
systemctl disable sshd.service ssh-login-monitor.service
systemctl disable sshd.socket 2> /dev/null || true
echo "SSH server disabled"
fi fi
# Setup desktop environment configurations # Setup desktop environment configurations