Lots of reorganization. Added stormux package repository. Removed unneeded packages. Switched to systemd management of logging to ram. Use existing tools to resize the image to fill the device, no more growpartfs. No packages installed from AUR any more.

This commit is contained in:
Storm Dragon
2025-08-19 15:18:04 -04:00
parent f80ea1e056
commit 8a7fb83be3
8 changed files with 214 additions and 160 deletions

View File

@@ -24,29 +24,33 @@ if [[ -x /opt/configure-stormux/configure-stormux.sh ]]; then
exit 0
fi
# make sure the system is at a decent volume
# Wait for pipewire to become available and set volume
echo "Waiting for audio system to initialize..."
volume=50
wait=0
# Wait for pipewire to become available
while [[ $wait -lt 30 ]]; do
if pgrep pipewire &> /dev/null ; then
wait=30 # We don't want to continue the loop
echo "Audio system ready. Setting up volume..."
break
else
sleep 1
continue
((wait++))
fi
done
# Volume calibration - this should be the first interactive part
while [[ $volume -le 130 ]]; do
clear
echo "Volume calibration (current: ${volume}%)"
pactl set-sink-volume @DEFAULT_SINK@ "${volume}%" 2>/dev/null
spd-say "If this is loud enough, press enter."
if read -t4 ; then
echo "Volume set to ${volume}%"
break
else
((volume+=5))
fi
while [[ $volume -le 130 ]]; do
clear
spd-say "If this is loud enough, press enter."
if read -t4 ; then
break
else
((volume+=5))
fi
pactl set-sink-volume @DEFAULT_SINK@ "${volume}%"
done
((wait++))
done
export DIALOGOPTS='--insecure --no-lines --visit-items'
@@ -98,7 +102,16 @@ if [[ $diskSize -le 7 ]]; then
read -r continue
continue="${continue::1}"
if [[ "${continue,}" == "y" ]];then
sudo "${sudoFlags[@]}" growpartfs $diskSource
# Extract base device name (handles mmcblk0p2, nvme0n1p2, sda2, etc.)
if [[ "$diskSource" =~ (.*[0-9]+)p[0-9]+$ ]]; then
# Handle mmcblk0p2, nvme0n1p2 style
diskDevice="${BASH_REMATCH[1]}"
else
# Handle sda2, sdb3 style
diskDevice="$(echo "$diskSource" | sed 's/[0-9]*$//')"
fi
sudo "${sudoFlags[@]}" parted "$diskDevice" resizepart 2 100%
sudo "${sudoFlags[@]}" resize2fs "$diskSource"
fi
fi