Start removal of offline install options

This commit is contained in:
natemaia 2018-12-02 18:09:41 -08:00
parent 678019d663
commit 50faa08c2c
3 changed files with 25 additions and 29 deletions

View File

@ -14,7 +14,7 @@ declare -g WARN=false
declare -g AUTOLOGIN=false declare -g AUTOLOGIN=false
declare -g CONFIG_DONE=false declare -g CONFIG_DONE=false
declare -g SEPERATE_BOOT=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 BT="$DIST Installer - (x86_64) - Version $VER"
declare -g ROOT_PART="" declare -g ROOT_PART=""
@ -536,23 +536,12 @@ configure_system_settings()
fi fi
tput civis tput civis
if [[ $HAS_NETWORK == true ]]; then
if ! KERNEL="$(menubox "$_KernelTitle" "$_KernelBody" 0 0 0 'linux' '-' 'linux-lts' '-')"; then if ! KERNEL="$(menubox "$_KernelTitle" "$_KernelBody" 0 0 0 'linux' '-' 'linux-lts' '-')"; then
return 1 return 1
fi fi
select_wm_or_de || return 1 select_wm_or_de || return 1
select_packages || return 1 select_packages || return 1
select_mirrorcmd || 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"
fi
export CONFIG_DONE=true export CONFIG_DONE=true
return 0 return 0

View File

@ -27,16 +27,12 @@ install()
echeck "genfstab -U $MNT > $MNT/etc/fstab" echeck "genfstab -U $MNT > $MNT/etc/fstab"
[[ -f $MNT/swapfile ]] && sed -i "s~${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 # update the mirrorlist.. MUST be done before updating or it may be slow
# this may already have been done if # this may already have been done if
oneshot mirrorlist_sort oneshot mirrorlist_sort
# MUST be before bootloader and running mkinitcpio # MUST be before bootloader and running mkinitcpio
oneshot package_operations oneshot package_operations
else
chrun 'pacman -Rns archlabs-installer --noconfirm'
fi
# mkinitcpio and bootloader install should only be done after installing the packages # 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 # 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" printf "\nUnpacking base system --- Total: ~ 2.9G\n\n"
rsync -ah --info=progress2 /run/archiso/sfs/airootfs/ $MNT/ rsync -ah --info=progress2 /run/archiso/sfs/airootfs/ $MNT/
else else
# update the mirrorlist.. MUST be done before pacstrapping or it may be slow # update the mirrorlist.. MUST be done before pacstrapping or it may be slow
oneshot mirrorlist_sort oneshot mirrorlist_sort
@ -112,7 +107,9 @@ EOF
fi fi
# copy network settings # 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/ 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 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 chrun "locale-gen" 2>/dev/null
# set the timezone # set the timezone
chrun "ln -sf /usr/share/zoneinfo/$ZONE/$SUBZONE /etc/localtime" 2>/dev/null 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 # set the keymaps
cat > $MNT/etc/X11/xorg.conf.d/00-keyboard.conf <<EOF cat > $MNT/etc/X11/xorg.conf.d/00-keyboard.conf <<EOF

View File

@ -149,6 +149,13 @@ system_checks()
[[ $(whoami) == "root" ]] || { infobox "$_ErrTitle" "$_NotRoot\n$_Exit" && die 1; } [[ $(whoami) == "root" ]] || { infobox "$_ErrTitle" "$_NotRoot\n$_Exit" && die 1; }
grep -qw 'lm' /proc/cpuinfo || { infobox "$_ErrTitle" "$_Not64Bit\n$_Exit" && die 1; } grep -qw 'lm' /proc/cpuinfo || { infobox "$_ErrTitle" "$_Not64Bit\n$_Exit" && die 1; }
if grep -qw 'BCM4352' <<< "$(lspci -vnn -d 14e4:)"; then
rmmod bcma >/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 ! 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 if [[ $(systemctl is-active NetworkManager) == "active" ]] && hash nmtui >/dev/null 2>&1; then
tput civis; nmtui-connect tput civis; nmtui-connect