From 50faa08c2c59f588904ba2b024ddd68982269770 Mon Sep 17 00:00:00 2001 From: natemaia Date: Sun, 2 Dec 2018 18:09:41 -0800 Subject: [PATCH] Start removal of offline install options --- src/lib/dialogs.sh | 23 ++++++----------------- src/lib/install.sh | 24 ++++++++++++------------ src/lib/utils.sh | 7 +++++++ 3 files changed, 25 insertions(+), 29 deletions(-) diff --git a/src/lib/dialogs.sh b/src/lib/dialogs.sh index 7b8f432..6428edd 100644 --- a/src/lib/dialogs.sh +++ b/src/lib/dialogs.sh @@ -14,7 +14,7 @@ declare -g WARN=false declare -g AUTOLOGIN=false declare -g CONFIG_DONE=false declare -g SEPERATE_BOOT=false -declare -g HAS_NETWORK=false +declare -g BROADCOM_WL=false declare -g BT="$DIST Installer - (x86_64) - Version $VER" declare -g ROOT_PART="" @@ -536,23 +536,12 @@ configure_system_settings() fi tput civis - if [[ $HAS_NETWORK == true ]]; then - if ! KERNEL="$(menubox "$_KernelTitle" "$_KernelBody" 0 0 0 'linux' '-' 'linux-lts' '-')"; then - return 1 - fi - select_wm_or_de || return 1 - select_packages || return 1 - select_mirrorcmd || return 1 - else - # defaults for when there is no network connection - KERNEL='linux' - AUTOLOGIN=true - LOGIN_TYPE='xinit' - INSTALL_WMS='openbox' - LOGIN_WM='openbox-session' - MIRROR_CMD="reflector --score 100 -l 50 -f 10 --sort rate --verbose" - EDIT_FILES[11]="/home/$NEWUSER/.xinitrc /home/$NEWUSER/.xprofile" + if ! KERNEL="$(menubox "$_KernelTitle" "$_KernelBody" 0 0 0 'linux' '-' 'linux-lts' '-')"; then + return 1 fi + select_wm_or_de || return 1 + select_packages || return 1 + select_mirrorcmd || return 1 export CONFIG_DONE=true return 0 diff --git a/src/lib/install.sh b/src/lib/install.sh index f6b322b..2ff0aea 100644 --- a/src/lib/install.sh +++ b/src/lib/install.sh @@ -27,16 +27,12 @@ install() echeck "genfstab -U $MNT > $MNT/etc/fstab" [[ -f $MNT/swapfile ]] && sed -i "s~${MNT}~~" $MNT/etc/fstab - if [[ $HAS_NETWORK == true ]]; then - # update the mirrorlist.. MUST be done before updating or it may be slow - # this may already have been done if - oneshot mirrorlist_sort + # update the mirrorlist.. MUST be done before updating or it may be slow + # this may already have been done if + oneshot mirrorlist_sort - # MUST be before bootloader and running mkinitcpio - oneshot package_operations - else - chrun 'pacman -Rns archlabs-installer --noconfirm' - fi + # MUST be before bootloader and running mkinitcpio + oneshot package_operations # mkinitcpio and bootloader install should only be done after installing the packages # and updating the mirrorlist, otherwise the chosen kernel may not be fully set up @@ -63,7 +59,6 @@ install_base() printf "\nUnpacking base system --- Total: ~ 2.9G\n\n" rsync -ah --info=progress2 /run/archiso/sfs/airootfs/ $MNT/ else - # update the mirrorlist.. MUST be done before pacstrapping or it may be slow oneshot mirrorlist_sort @@ -112,7 +107,9 @@ EOF fi # copy network settings - [[ -e /etc/NetworkManager/system-connections ]] && cp -rf /etc/NetworkManager/system-connections $MNT/etc/NetworkManager/ + if [[ -e /etc/NetworkManager/system-connections ]]; then + cp -rf /etc/NetworkManager/system-connections $MNT/etc/NetworkManager/ + fi cp -f /etc/resolv.conf $MNT/etc/ @@ -126,10 +123,13 @@ EOF sed -i "s/#en_US.UTF-8/en_US.UTF-8/g; s/#${LOCALE}/${LOCALE}/g" $MNT/etc/locale.gen chrun "locale-gen" 2>/dev/null - # set the timezone chrun "ln -sf /usr/share/zoneinfo/$ZONE/$SUBZONE /etc/localtime" 2>/dev/null + if [[ $BROADCOM_WL == true ]]; then + echo 'blacklist bcma' >> $MNT/etc/modprobe.d/blacklist.conf + rm -f $MNT/etc/modprobe/ + fi # set the keymaps cat > $MNT/etc/X11/xorg.conf.d/00-keyboard.conf </dev/null 2>&1 + rmmod wl >/dev/null 2>&1 + modprobe wl >/dev/null 2>&1 + export BROADCOM_WL=true + fi + if ! curl -s --head 'https://www.archlinux.org/mirrorlist/all/' | sed '1q' | grep -qw '200'; then if [[ $(systemctl is-active NetworkManager) == "active" ]] && hash nmtui >/dev/null 2>&1; then tput civis; nmtui-connect