nw driver selection needs to be checklist

- to be able to select both wifi and lan drivers for example
- improve some returns
This commit is contained in:
Bernhard Landauer 2017-03-14 20:15:31 +01:00
parent f31f1bf5d2
commit edbcc05be3
3 changed files with 5 additions and 4 deletions

View File

@ -101,6 +101,7 @@ install_extra() {
for p in ${cpkgs}; do
! grep "$p" /mnt/.base && options+=("$p" "" off)
done
nb="$((${#options[@]}/3))"; (( nb>20 )) && nb=20 # if list too long limit
DIALOG " $_InstComTitle " --checklist "\n$_InstComBody\n\n$_UseSpaceBar\n " 0 50 $nb "${options[@]}" 2>${PACKAGES}
# If at least one package, install.
@ -231,7 +232,7 @@ install_base() {
# Create the base list of packages
echo "" > /mnt/.base
# Choose kernel and possibly base-devel
DIALOG " $_InstBseTitle " --checklist "\n$_InstStandBseBody$_UseSpaceBar\n " 0 0 13 \
DIALOG " $_InstBseTitle " --checklist "\n$_InstStandBseBody$_UseSpaceBar\n " 0 0 20 \
"yaourt + base-devel" "-" off \
$(cat /tmp/.available_kernels | awk '$0=$0" - off"') 2>${PACKAGES} || return 0
cat ${PACKAGES} | sed 's/+ \|\"//g' | tr ' ' '\n' >> /mnt/.base

View File

@ -40,13 +40,13 @@ setup_network_drivers() {
if [[ $(mhwd -l | awk '/network-/' | wc -l) -eq 0 ]]; then
DIALOG " $_InstNWDrv " --msgbox "\n$_InfoNWKernel\n " 0 0
else
DIALOG " $_InstGrDrv " --radiolist "\n$_UseSpaceBar\n " 0 0 12 \
DIALOG " $_InstGrDrv " --checklist "\n$_UseSpaceBar\n " 0 0 12 \
$(mhwd -l | awk '/network-/{print $1}' |awk '$0=$0" - off"') 2> /tmp/.network_driver || return 0
if [[ $(cat /tmp/.driver) != "" ]]; then
clear
arch_chroot "mhwd -f -i pci $(cat /tmp/.network_driver)" 2>$ERR
check_for_error "install $(cat /tmp/.network_driver)" $?
check_for_error "install $(cat /tmp/.network_driver)" $? || return 1
else
DIALOG " $_ErrTitle " --msgbox "\nNo network driver selected\n " 0 0
check_for_error "No network-driver selected."

View File

@ -178,7 +178,7 @@ install_drivers_menu() {
"1") install_graphics_menu
HIGHLIGHT_SUB=2
;;
"2") setup_network_drivers
"2") setup_network_drivers || DIALOG " $_InstBseTitle " --infobox "\n$_InstFail\n " 0 0
HIGHLIGHT_SUB=3
;;
*) HIGHLIGHT_SUB=5