From 4dcd7d131fb949fc5b083f9accd62ac81aac5be8 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Fri, 14 Jul 2023 20:50:12 +0200 Subject: [PATCH] Minor improvements and fixes all over the place --- README.md | 1 + install-stage1.sh | 6 +++--- install-stage2.sh | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 318b444..c5cbe56 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ There are a couple manual steps to get started before the installer scripts can - Be aware that Void uses a US keymap until you change it. If your keyboard is different, you might need to look up an image of a US keyboard to find the right keys. - If booting off the USB stick you want to install to, use (RAM) option - Log in as `root`, password `voidlinux` + - It won’t display anything while you type in the password but it will accept it. - If you need to use WiFi, run `void-installer` - Set your keyboard layout (optional) - Connect to your network diff --git a/install-stage1.sh b/install-stage1.sh index fcba501..ec1de6e 100644 --- a/install-stage1.sh +++ b/install-stage1.sh @@ -51,7 +51,7 @@ if [ ! "$(id -u)" -eq 0 ]; then exit 1 fi -if ping -c4 repo-default.voidlinux.org >> $LOGFILE 2>&1; then +if ping -c2 repo-default.voidlinux.org >> $LOGFILE 2>&1; then : else echo "An internet connection is required to run this script." @@ -240,7 +240,7 @@ echo "Adding mirror configuration." echo "repository=$TARGET_MIRROR" > /mnt/target/etc/xbps.d/00-repository-main.conf echo "Adding sudo configuration." -echo "%wheel ALL=(ALL:ALL) ALL" > /mnt/target/etc/sudoers.d/wheel_as_sudo_group.conf +echo "%wheel ALL=(ALL:ALL) ALL" > /mnt/target/etc/sudoers.d/wheel_as_sudo_group echo "Disabling root password." run_in_target passwd --lock root @@ -432,7 +432,7 @@ echo 'if [ -x /sbin/agetty -o -x /bin/agetty ]; then fi' > /mnt/target/etc/sv/agetty-tty1/conf [ -f /mnt/target/root/.profile ] && mv /mnt/target/root/.profile /mnt/target/root/.profile.bak >> $LOGFILE 2>&1 -echo "if ps aux | grep 'installer-stage2.sh' > /dev/null 2>&1; then +echo "if ps aux | grep 'installer-stage2.sh' | grep -v 'grep' > /dev/null 2>&1; then true else /opt/void-usb/installer/install-stage2.sh diff --git a/install-stage2.sh b/install-stage2.sh index fe4a1fb..644dd03 100644 --- a/install-stage2.sh +++ b/install-stage2.sh @@ -93,15 +93,17 @@ for I in ${!SECTIONS[@]}; do else clear cat "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/description.txt" + echo "" for J in ${!AVAILABLE_OPTIONS[@]}; do source "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/${AVAILABLE_OPTIONS[$J]}" echo "$J: $DESCRIPTION" done CHOICE="" while [ -z "$CHOICE" ]; do + echo "" echo "Select by entering the corresponding number." read -p "> " CHOICE_NUMBER - CHOICE="${AVAILABLE_OPTIONS[$CHOICE_NUMBER]}" + grep "^[0-9]*$" <<< "$CHOICE_NUMBER" && CHOICE="${AVAILABLE_OPTIONS[$CHOICE_NUMBER]}" done fi