Cleanup a few spots

This commit is contained in:
natemaia 2020-11-04 11:48:35 -08:00
parent 98d38ad037
commit 3e88c39002

View File

@ -1731,15 +1731,14 @@ install_base()
clear clear
tput cnorm tput cnorm
if [[ $BG_PID ]] && kill -0 $BG_PID 2> /dev/null; then if [[ $BG_PID ]] && kill -0 $BG_PID 2> /dev/null; then
[[ -e /tmp/wmlist ]] && rm /tmp/wmlist [[ -e /tmp/wmlist ]] && rm -f /tmp/wmlist
printf "\nA background install process is still running, tailing the output...\n" printf "\nA background install process is still running, tailing the output...\n"
tail -f --pid=$BG_PID "$BG" tail -f --pid=$BG_PID "$BG"
trap - EXIT trap - EXIT
unset BG_PID unset BG_PID
fi fi
mkdir -pv "$MNT/etc/default" mkdir -pv "$MNT/etc/default" "$MNT/etc/X11/xorg.conf.d/"
mkdir -pv "$MNT/etc/X11/xorg.conf.d/"
if [[ $DIST == "ArchLabs" ]]; then if [[ $DIST == "ArchLabs" ]]; then
# we have some customizations in /etc on the iso we want to preserve # we have some customizations in /etc on the iso we want to preserve
@ -1756,8 +1755,8 @@ install_base()
[[ -d /etc/NetworkManager/system-connections ]] && cp -rvf /etc/NetworkManager/system-connections "$MNT/etc/NetworkManager/" [[ -d /etc/NetworkManager/system-connections ]] && cp -rvf /etc/NetworkManager/system-connections "$MNT/etc/NetworkManager/"
# stop pacman complaining # stop pacman complaining
chrun 'mkdir -p /var/lib/pacman/sync' mkdir -p "$MNT/var/lib/pacman/sync"
chrun 'touch /var/lib/pacman/sync/{core.db,extra.db,community.db}' touch "$MNT"/var/lib/pacman/sync/{core.db,extra.db,community.db}
echo "LANG=$LOCALE" > "$MNT/etc/locale.conf" echo "LANG=$LOCALE" > "$MNT/etc/locale.conf"
cp -fv "$MNT/etc/locale.conf" "$MNT/etc/default/locale" cp -fv "$MNT/etc/locale.conf" "$MNT/etc/default/locale"
@ -2105,7 +2104,7 @@ install_tearfree()
EndSection EndSection
EOF EOF
cat "$xpath/20-radeon.conf" cat "$xpath/20-radeon.conf"
elif lspci | grep ' VGA ' | grep -q 'NVIDIA'; then # nvidia cards require a bit of checking for notebook gpus elif hash nvidia-installer > /dev/null 2>&1 && lspci | grep ' VGA ' | grep -q 'NVIDIA'; then # nvidia cards require a bit of checking for notebook gpus
echo "Trying nvidia driver install" echo "Trying nvidia driver install"
if lspci | grep ' VGA ' | grep -q 'Intel\|AMD' && lspci | grep ' VGA ' | grep -q 'NVIDIA.*[6-9][1-8][05]M[X]\?\|NVIDIA.*Quadro.*[KMP][1-6][0-2][0]*M'; then if lspci | grep ' VGA ' | grep -q 'Intel\|AMD' && lspci | grep ' VGA ' | grep -q 'NVIDIA.*[6-9][1-8][05]M[X]\?\|NVIDIA.*Quadro.*[KMP][1-6][0-2][0]*M'; then
if [[ $xpath == *"$MNT"* ]]; then if [[ $xpath == *"$MNT"* ]]; then
@ -2135,12 +2134,14 @@ install_tearfree()
else else
echo "Unable to install nvidia driver" echo "Unable to install nvidia driver"
fi fi
else
echo "Unknown video card - aborting driver setup"
fi fi
if lspci | grep ' VGA ' | grep -q 'Intel\|AMD/ATI'; then if lspci | grep ' VGA ' | grep -q 'Intel\|AMD/ATI'; then
if [[ $xpath == *"$MNT"* ]]; then if [[ $xpath == *"$MNT"* && -f "$MNT/etc/skel/.config/picom.conf" ]]; then
sed -i 's/xrender/glx/g' "$MNT/etc/skel/.config/picom.conf" sed -i 's/xrender/glx/g' "$MNT/etc/skel/.config/picom.conf"
else elif [[ -f /etc/skel/.config/picom.conf ]]; then
sed -i 's/xrender/glx/g' /etc/skel/.config/picom.conf sed -i 's/xrender/glx/g' /etc/skel/.config/picom.conf
fi fi
fi fi