Remove Package Selections, removed non-ascii

characters
master
Joca 2025-01-28 18:59:16 -03:00
parent 4b6926c004
commit 734d5b8332
Signed by: jocadbz
GPG Key ID: B1836DCE2F50BDF7
20 changed files with 2 additions and 315 deletions

View File

@ -62,7 +62,7 @@ fi
echo " echo "
This script will now download and install Void Linux on your USB stick. This script will now download and install Void Linux on your USB stick.
Any data that is currently on the stick will be lost and it wont be Any data that is currently on the stick will be lost and it won't be
usable from Windows or MacOS. usable from Windows or MacOS.
Before we begin, the following packages need to be installed (if not installed already): Before we begin, the following packages need to be installed (if not installed already):
@ -372,7 +372,7 @@ mkdir /mnt/target/boot/efi/LOADER >> $LOGFILE 2>&1
echo "GRUB has been deliberately installed to a non-standard location. echo "GRUB has been deliberately installed to a non-standard location.
This avoids default kernel hooks breaking the custom config." > /mnt/target/boot/efi/LOADER/README.TXT This avoids default kernel hooks breaking the custom config." > /mnt/target/boot/efi/LOADER/README.TXT
# no idea if any of these are even necessary/relevant but it cant hurt... # no idea if any of these are even necessary/relevant but it can't hurt...
TARGET_PRELOAD_GRUB_MODULES="usb usbms uhci ehci ohci part_gpt f2fs ahci ata pata" TARGET_PRELOAD_GRUB_MODULES="usb usbms uhci ehci ohci part_gpt f2fs ahci ata pata"
run_in_target grub-install --target=i386-pc --boot-directory=/boot/efi/LOADER --disk-module=native --modules="'$TARGET_PRELOAD_GRUB_MODULES'" "'/dev/$TARGET_DISK'" >> $LOGFILE 2>&1 run_in_target grub-install --target=i386-pc --boot-directory=/boot/efi/LOADER --disk-module=native --modules="'$TARGET_PRELOAD_GRUB_MODULES'" "'/dev/$TARGET_DISK'" >> $LOGFILE 2>&1
run_in_target grub-install --target=i386-efi --boot-directory=/boot/efi/LOADER --disk-module=native --efi-directory=/boot/efi --removable --no-nvram --modules="'$TARGET_PRELOAD_GRUB_MODULES'" "'/dev/$TARGET_DISK'" >> $LOGFILE 2>&1 run_in_target grub-install --target=i386-efi --boot-directory=/boot/efi/LOADER --disk-module=native --efi-directory=/boot/efi --removable --no-nvram --modules="'$TARGET_PRELOAD_GRUB_MODULES'" "'/dev/$TARGET_DISK'" >> $LOGFILE 2>&1
@ -414,24 +414,6 @@ function get_stage2_file {
get_stage2_file install-stage2.sh >> $LOGFILE 2>&1 get_stage2_file install-stage2.sh >> $LOGFILE 2>&1
chmod 744 "$STAGE2_DIR/install-stage2.sh" >> $LOGFILE 2>&1 chmod 744 "$STAGE2_DIR/install-stage2.sh" >> $LOGFILE 2>&1
get_stage2_file package_selections/sections.lst
readarray -t SECTIONS < "$STAGE2_DIR/package_selections/sections.lst"
for I in ${!SECTIONS[@]}; do
get_stage2_file "package_selections/${SECTIONS[$I]}/description.txt"
get_stage2_file "package_selections/${SECTIONS[$I]}/options.lst"
readarray -t OPTIONS < "$STAGE2_DIR/package_selections/${SECTIONS[$I]}/options.lst"
for J in ${!OPTIONS[@]}; do
get_stage2_file "package_selections/${SECTIONS[$I]}/${OPTIONS[$J]}"
done
get_stage2_file "package_selections/${SECTIONS[$I]}/additional_files.lst"
readarray -t FILES < "$STAGE2_DIR/package_selections/${SECTIONS[$I]}/additional_files.lst"
for J in ${!FILES[@]}; do
get_stage2_file "package_selections/${SECTIONS[$I]}/${FILES[$J]}"
done
done
mv /mnt/target/etc/sv/agetty-tty1/conf /mnt/target/etc/sv/agetty-tty1/conf.bak >> $LOGFILE 2>&1 mv /mnt/target/etc/sv/agetty-tty1/conf /mnt/target/etc/sv/agetty-tty1/conf.bak >> $LOGFILE 2>&1
echo 'if [ -x /sbin/agetty -o -x /bin/agetty ]; then echo 'if [ -x /sbin/agetty -o -x /bin/agetty ]; then
if [ "${tty}" = "tty1" ]; then if [ "${tty}" = "tty1" ]; then

View File

@ -78,42 +78,4 @@ if [ "$INTERNET" = "up" ]; then
echo "done" echo "done"
fi fi
readarray -t SECTIONS < /opt/void-usb/installer/package_selections/sections.lst
for I in ${!SECTIONS[@]}; do
readarray -t OPTIONS < "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/options.lst"
AVAILABLE_OPTIONS=()
for J in ${!OPTIONS[@]}; do
source "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/${OPTIONS[$J]}"
if check; then
AVAILABLE_OPTIONS+=("${OPTIONS[$J]}")
fi
done
if [ -z "${AVAILABLE_OPTIONS[1]}" ]; then
# no need to ask, there is only one option anyway
CHOICE="${AVAILABLE_OPTIONS[0]}"
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
grep "^[0-9]*$" <<< "$CHOICE_NUMBER" && CHOICE="${AVAILABLE_OPTIONS[$CHOICE_NUMBER]}"
done
fi
source "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/$CHOICE"
if [ -n "$PACKAGES" ]; then
xbps-install --yes $PACKAGES
fi
post_install
done
bash --norc --noprofile bash --norc --noprofile

View File

@ -1,19 +0,0 @@
# Package Selections
These are intended to give the user a bunch of choices when installing the
system. For example whether to use XFE or a more fully featured set of applications.
## Sections
Sections contain choices of a specific category. The sections are stored in
folders containing the sections description and its options.
For each section, only one of the options can be chosen.
The file `sections.lst` holds a list of all available sections in the order
in which the user will be asked about them.
## Options
Options are shell scripts that are sourced by the stage 2 installer.
They hold variables for description, package list, pre-install checks,
and additional post-install actions.
Options are shown in the order in which they appear in `options.lst`.

View File

@ -1,3 +0,0 @@
resources/common_packages
resources/xinitrc
resources/bashrc

View File

@ -1 +0,0 @@
Choose a desktop setup to install

View File

@ -1,13 +0,0 @@
function check {
[ "$INTERNET" = "down" ] && return 1
return 0
}
DESCRIPTION="Fully featured desktop with IceWM"
# TODO
PACKAGES="$(cat /opt/void-usb/installer/package_selections/desktop/resources/common_packages) pavucontrol network-manager-applet vlc lxterminal bash-completion gufw conky icewm firefox arandr xscreensaver-elogind volctl"
function post_install {
echo "desktop/icewm-light" >> /tmp/stage-2-choices
}

View File

@ -1,13 +0,0 @@
function check {
[ "$INTERNET" = "down" ] && return 1
return 0
}
DESCRIPTION="Small desktop with IceWM"
# TODO
PACKAGES="$(cat /opt/void-usb/installer/package_selections/desktop/resources/common_packages) pulsemixer xterm icewm firefox htop xfe"
function post_install {
echo "desktop/icewm-light" >> /tmp/stage-2-choices
}

View File

@ -1,11 +0,0 @@
function check {
return 0
}
DESCRIPTION="Leave the system as-is (no desktop)"
PACKAGES=""
function post_install {
echo "desktop/none" >> /tmp/stage-2-choices
}

View File

@ -1,3 +0,0 @@
icewm-full
icewm-lite
none

View File

@ -1,94 +0,0 @@
# ALWAYS RUN
# ==========
# things to always set up, even for non-interactive shells
EDITOR=nano
PAGER=less
if grep -F ".local/bin" <<< "$PATH"; then
true
else
PATH="$HOME/.local/bin:$PATH"
fi
export EDITOR PAGER PATH
# CHECK INTERACTIVE
# =================
# Don't do anything after this if not running an interactive shell.
case $- in
*i*) ;;
*) return ;;
esac
# START XORG
# ==========
# TODO
# check if login shell
# if yes, check if .xinitrc exists
# if yes, check if xorg is already running
# if no, startx
# ALIASES
# =======
alias aliases="nano $HOME/.bashrc_aliases && source $HOME/.bashrc_aliases"
[ -f $HOME/.bashrc_aliases ] && source $HOME/.bashrc_aliases
# BASH COMPLETION
# ===============
# include bash completions if they exist
# (may need to be adjusted to where the bash completions are stored on the current system)
# Default for FreeBSD:
if [ -f /usr/local/share/bash-completion/bash_completion.sh ]; then
source /usr/local/share/bash-completion/bash_completion.sh
# Default for Linux:
elif [ -f /usr/share/bash-completion/bash_completion ]; then
source /usr/share/bash-completion/bash_completion
fi
# VARIABLES
# =========
# don't put duplicate lines or lines starting with a space in history
HISTCONTROL=ingnoreboth
# unlimited history
HISTSIZE=-1
HISTFILESIZE=-1
# set a fancy prompt
PROMPT_COMMAND="PS1=\"[\[\e[03$(
if [ $EUID -eq 0 ]
then
echo -n '1;02m'
else
if [ -n "$(groups | grep 'wheel\|sudo')" ];
then
echo -n '2;01m'
else
echo -n '6;01m'
fi
fi
)\]\u@\h\[\e[0m\]]:\$(
PROMPT_ERRORLEVEL=\$?
if [ \$PROMPT_ERRORLEVEL -eq 0 ]
then
echo -n '\[\e[032;02m\]'
else
echo -n '\[\e[031;02m\]'
fi
echo -n \$PROMPT_ERRORLEVEL
echo -n '\[\e[00m\]'
):\[\e[034;01m\]\$(pwd)\[\e[0m\]:$(
if [ $EUID -eq 0 ]
then
echo -n '\[\e[02m\]#\[\e[0m\]'
else
echo -n '\[\e[02m\]$\[\e[0m\]'
fi
)> \""
# SHELL OPTIONS
# =============
shopt -s histappend
shopt -s checkwinsize
shopt -s globstar

View File

@ -1 +0,0 @@
setxkbmap xauth xorg-video-drivers mesa mesa-dri xorg-server elogind xorg-input-drivers xrandr acpilight xhost xinit xrdb xinput xgamma xset iceauth sessreg transset xcmsdb xkbutils xmodmap dejavu-fonts-ttf elogind xdg-utils dbus-elogind dbus-elogind-libs dbus-elogind-x11 pipewire

View File

@ -1,18 +0,0 @@
#!/bin/sh
if grep -F ".local/bin" <<< "$PATH"; then
true
else
PATH="$HOME/.local/bin:$PATH"
fi
export PATH
if [ -d "$HOME/.xinitrc.d" ]; then
for FILE in "$HOME/.xinitrc.d"/*; do
[ -x "$FILE" ] && "$FILE" &
done
fi
# The line below is placed by the package selection script.

View File

@ -1,10 +0,0 @@
Do you want to install the proprietary Nvidia driver?
By default, Void Linux ships with the open-source nouveau driver.
This is nice because it gets the system up and running when using an
Nvidia GPU but, due to Nvidias secrecy, nouveau isnt particularly good.
Installing the proprietary driver is recommended if you want to use Nvidia GPUs.
This will enable the nonfree repository.
Different versions are available. You can only choose one.

View File

@ -1,11 +0,0 @@
function check {
return 0
}
DESCRIPTION="Dont install."
PACKAGES=""
function post_install {
echo "nvidia/none" >> /tmp/stage-2-choices
}

View File

@ -1,18 +0,0 @@
function check {
[ "$INTERNET" = "down" ] && return 1
if xbps-query glibc >/dev/null 2>&1; then
return 0
else
return 1
fi
}
DESCRIPTION="Latest Nvidia driver, supports GTX ??? series and up"
#TODO: void-repo-nonfree
PACKAGES="nvidia"
function post_install {
#TODO: nvidia modeset kernel parameter?
echo "nvidia/nvidia" >> /tmp/stage-2-choices
}

View File

@ -1,18 +0,0 @@
function check {
[ "$INTERNET" = "down" ] && return 1
if xbps-query glibc >/dev/null 2>&1; then
return 0
else
return 1
fi
}
DESCRIPTION="Legacy Nvidia driver, version 390, supports GTX ??? series"
#TODO: void-repo-nonfree
PACKAGES="nvidia390"
function post_install {
#TODO: nvidia modeset kernel parameter?
echo "nvidia/nvidia390" >> /tmp/stage-2-choices
}

View File

@ -1,18 +0,0 @@
function check {
[ "$INTERNET" = "down" ] && return 1
if xbps-query glibc >/dev/null 2>&1; then
return 0
else
return 1
fi
}
DESCRIPTION="Legacy Nvidia driver, version 470, supports GTX ??? series"
#TODO: void-repo-nonfree
PACKAGES="nvidia470"
function post_install {
#TODO: nvidia modeset kernel parameter?
echo "nvidia/nvidia470" >> /tmp/stage-2-choices
}

View File

@ -1,4 +0,0 @@
none
nvidia
nvidia470
nvidia390

View File

@ -1,2 +0,0 @@
nvidia
desktop