From 02694bae7dff8137ddfcfc025abb7fe6ef3b53ec Mon Sep 17 00:00:00 2001 From: Tommaso Chiti Date: Sun, 9 May 2021 09:43:34 +0200 Subject: [PATCH] Update easy-arch.sh --- easy-arch.sh | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/easy-arch.sh b/easy-arch.sh index f9c94c0..655108c 100644 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -3,7 +3,7 @@ # Cleaning the TTY. clear -# Selecting the kernel flavor to install. +# Selecting a kernel to install. kernel_selector () { echo "List of kernels:" echo "1) Stable — Vanilla Linux kernel and modules, with a few patches applied." @@ -26,6 +26,39 @@ kernel_selector () { esac } +# Selecting a way to handle internet connection. +network_selector () { + echo "Network utilities:" + echo "1) IWD — iNet wireless daemon is a wireless daemon for Linux written by Intel (WiFi-only)." + echo "2) NetworkManager — Program for providing detection and configuration for systems to automatically connect to networks (both WiFi and Ethernet)." + echo "3) wpa_supplicant — It's a cross-platform supplicant with support for WEP, WPA and WPA2 (WiFi-only, a DHCP client will be automatically installed too.)" + echo "4) I will do this on my own." + read -r -p "Insert the number of the corresponding kernel: " choice + echo "$choice will be installed" + case $choice in + 1 ) echo "Installing IWD." + pacstrap /mnt iwd + echo "Enabling IWD." + systemctl enable iwd --root=/mnt &>/dev/null + ;; + 2 ) echo "Installing NetworkManager." + pacstrap /mnt networkmanager + echo "Enabling NetworkManager." + systemctl enable NetworkManager --root=/mnt &>/dev/null + ;; + 3 ) echo "Installing wpa_supplicant and dhcpcd." + pacstrap /mnt wpa_supplicant dhcpcd + echo "Enabling wpa_supplicant and dhcpcd." + systemctl enable wpa_supplicant --root=/mnt &>/dev/null + systemctl enable dhcpcd --root=/mnt &>/dev/null + ;; + 4 ) + ;; + * ) echo "You did not enter a valid selection." + network_selector + esac +} + # Checking the microcode to install. CPU=$(grep vendor_id /proc/cpuinfo) if [[ $CPU == *"AuthenticAMD"* ]] @@ -194,10 +227,6 @@ EOF echo "Setting root password." arch-chroot /mnt /bin/passwd -# Enabling NetworkManager service. -echo "Enabling NetworkManager." -systemctl enable NetworkManager --root=/mnt &>/dev/null - # Enabling Snapper automatic snapshots. echo "Enabling Snapper." systemctl enable snapper-timeline.timer --root=/mnt &>/dev/null