Revert "Strip the menu from unnecessary options for the time being."

This reverts commit d3e88b4681.
merge-requests/273/head
Chrysostomus 8 years ago
parent d3e88b4681
commit 5ee0051509

@ -21,7 +21,7 @@ set_keymap() {
fi fi
echo -e "KEYMAP=${KEYMAP}\nFONT=${FONT}" > /tmp/vconsole.conf echo -e "KEYMAP=${KEYMAP}\nFONT=${FONT}" > /tmp/vconsole.conf
prep_menu prep_menu # Recurse
} }
# Set keymap for X11 # Set keymap for X11
@ -40,7 +40,7 @@ set_xkbmap() {
echo -e "Section "\"InputClass"\"\nIdentifier "\"system-keyboard"\"\nMatchIsKeyboard "\"on"\"\nOption "\"XkbLayout"\" "\"${XKBMAP}"\"\nEndSection" \ echo -e "Section "\"InputClass"\"\nIdentifier "\"system-keyboard"\"\nMatchIsKeyboard "\"on"\"\nOption "\"XkbLayout"\" "\"${XKBMAP}"\"\nEndSection" \
> ${MOUNTPOINT}/etc/X11/xorg.conf.d/00-keyboard.conf > ${MOUNTPOINT}/etc/X11/xorg.conf.d/00-keyboard.conf
install_graphics_menu install_graphics_menu # Recurse
} }
# locale array generation code adapted from the Manjaro 0.8 installer # locale array generation code adapted from the Manjaro 0.8 installer
@ -59,7 +59,7 @@ set_locale() {
arch_chroot "locale-gen" >/dev/null 2>$ERR arch_chroot "locale-gen" >/dev/null 2>$ERR
check_for_error "$FUNCNAME" "$?" check_for_error "$FUNCNAME" "$?"
config_base_menu config_base_menu # Recurse
} }
# Set Zone and Sub-Zone # Set Zone and Sub-Zone
@ -85,10 +85,10 @@ set_timezone() {
arch_chroot "ln -sf /usr/share/zoneinfo/${ZONE}/${SUBZONE} /etc/localtime" 2>$ERR arch_chroot "ln -sf /usr/share/zoneinfo/${ZONE}/${SUBZONE} /etc/localtime" 2>$ERR
check_for_error "$FUNCNAME ${ZONE}/${SUBZONE}" $? config_base_menu check_for_error "$FUNCNAME ${ZONE}/${SUBZONE}" $? config_base_menu
else else
config_base_menu config_base_menu # Recurse
fi fi
config_base_menu config_base_menu # Recurse
} }
set_hw_clock() { set_hw_clock() {
@ -98,10 +98,10 @@ set_hw_clock() {
if [[ $(cat ${ANSWER}) != "" ]]; then if [[ $(cat ${ANSWER}) != "" ]]; then
arch_chroot "hwclock --systohc --$(cat ${ANSWER})" 2>$ERR arch_chroot "hwclock --systohc --$(cat ${ANSWER})" 2>$ERR
check_for_error "$FUNCNAME" "$?" config_base_menu check_for_error "$FUNCNAME" "$?" config_base_menu
fi fi
config_base_menu config_base_menu # Recurse
} }
# Function will not allow incorrect UUID type for installed system. # Function will not allow incorrect UUID type for installed system.
@ -123,7 +123,7 @@ generate_fstab() {
fi fi
fi fi
config_base_menu config_base_menu # Recurse
} }
boot_encrypted_setting() { boot_encrypted_setting() {
@ -146,16 +146,17 @@ set_hostname() {
${ANSWER})\n::1\tlocalhost.localdomain\tlocalhost\t$(cat ${ANSWER})" > ${MOUNTPOINT}/etc/hosts 2>$ERR ${ANSWER})\n::1\tlocalhost.localdomain\tlocalhost\t$(cat ${ANSWER})" > ${MOUNTPOINT}/etc/hosts 2>$ERR
check_for_error "$FUNCNAME" 0 check_for_error "$FUNCNAME" 0
config_base_menu # Recurse
} }
# Adapted and simplified from the Manjaro 0.8 and Antergos 2.0 installers # Adapted and simplified from the Manjaro 0.8 and Antergos 2.0 installers
set_root_password() { set_root_password() {
DIALOG " $_ConfUsrRoot " --clear --insecure --passwordbox "$_PassRtBody" 0 0 \ DIALOG " $_ConfUsrRoot " --clear --insecure --passwordbox "$_PassRtBody" 0 0 \
2> ${ANSWER} || config_base_menu 2> ${ANSWER} || config_base_menu # Recurse
PASSWD=$(cat ${ANSWER}) PASSWD=$(cat ${ANSWER})
DIALOG " $_ConfUsrRoot " --clear --insecure --passwordbox "$_PassReEntBody" 0 0 \ DIALOG " $_ConfUsrRoot " --clear --insecure --passwordbox "$_PassReEntBody" 0 0 \
2> ${ANSWER} || config_base_menu 2> ${ANSWER} || config_base_menu # Recurse
PASSWD2=$(cat ${ANSWER}) PASSWD2=$(cat ${ANSWER})
if [[ $PASSWD == $PASSWD2 ]]; then if [[ $PASSWD == $PASSWD2 ]]; then
@ -168,16 +169,17 @@ set_root_password() {
set_root_password set_root_password
fi fi
config_base_menu # Recurse
} }
# Originally adapted from the Antergos 2.0 installer # Originally adapted from the Antergos 2.0 installer
create_new_user() { create_new_user() {
DIALOG " $_NUsrTitle " --inputbox "$_NUsrBody" 0 0 "" 2>${ANSWER} || config_base_menu DIALOG " $_NUsrTitle " --inputbox "$_NUsrBody" 0 0 "" 2>${ANSWER} || config_base_menu # Recurse
USER=$(cat ${ANSWER}) USER=$(cat ${ANSWER})
# Loop while user name is blank, has spaces, or has capital letters in it. # Loop while user name is blank, has spaces, or has capital letters in it.
while [[ ${#USER} -eq 0 ]] || [[ $USER =~ \ |\' ]] || [[ $USER =~ [^a-z0-9\ ] ]]; do while [[ ${#USER} -eq 0 ]] || [[ $USER =~ \ |\' ]] || [[ $USER =~ [^a-z0-9\ ] ]]; do
DIALOG " $_NUsrTitle " --inputbox "$_NUsrErrBody" 0 0 "" 2>${ANSWER} || config_base_menu DIALOG " $_NUsrTitle " --inputbox "$_NUsrErrBody" 0 0 "" 2>${ANSWER} || config_base_menu # Recurse
USER=$(cat ${ANSWER}) USER=$(cat ${ANSWER})
done done
@ -226,6 +228,7 @@ create_new_user() {
arch_chroot "chown -R ${USER}:${USER} /home/${USER}" arch_chroot "chown -R ${USER}:${USER} /home/${USER}"
[[ -e ${MOUNTPOINT}/etc/sudoers ]] && sed -i '/%wheel ALL=(ALL) ALL/s/^#//' ${MOUNTPOINT}/etc/sudoers [[ -e ${MOUNTPOINT}/etc/sudoers ]] && sed -i '/%wheel ALL=(ALL) ALL/s/^#//' ${MOUNTPOINT}/etc/sudoers
config_base_menu # Recurse
} }
run_mkinitcpio() { run_mkinitcpio() {
@ -238,7 +241,9 @@ run_mkinitcpio() {
([[ $LVM -eq 0 ]] && [[ $LUKS -eq 1 ]]) && { sed -i 's/block filesystems/block encrypt filesystems/g' ${MOUNTPOINT}/etc/mkinitcpio.conf 2>$ERR || check_for_error "LUKS hooks" $?; } ([[ $LVM -eq 0 ]] && [[ $LUKS -eq 1 ]]) && { sed -i 's/block filesystems/block encrypt filesystems/g' ${MOUNTPOINT}/etc/mkinitcpio.conf 2>$ERR || check_for_error "LUKS hooks" $?; }
arch_chroot "mkinitcpio -P" 2>$ERR arch_chroot "mkinitcpio -P" 2>$ERR
check_for_error "$FUNCNAME" "$?" config_base_menu check_for_error "$FUNCNAME" "$?" config_base_menu
config_base_menu # Recurse
} }
install_base() { install_base() {
@ -272,7 +277,7 @@ install_base() {
# Choose kernel and possibly base-devel # Choose kernel and possibly base-devel
DIALOG " $_InstBseTitle " --checklist "$_InstStandBseBody$_UseSpaceBar" 0 0 12 \ DIALOG " $_InstBseTitle " --checklist "$_InstStandBseBody$_UseSpaceBar" 0 0 12 \
$(cat /tmp/.available_kernels |awk '$0=$0" - off"') \ $(cat /tmp/.available_kernels |awk '$0=$0" - off"') \
"base-devel" "-" off 2>${PACKAGES} || main_menu_online "base-devel" "-" off 2>${PACKAGES} || main_menu_online # Recurse
cat ${PACKAGES} >> /mnt/.base cat ${PACKAGES} >> /mnt/.base
if [[ $(cat ${PACKAGES}) == "" ]]; then if [[ $(cat ${PACKAGES}) == "" ]]; then
install_base_menu install_base_menu
@ -294,7 +299,7 @@ install_base() {
"KERNEL-spl" "-" off \ "KERNEL-spl" "-" off \
"KERNEL-zfs" "-" off 2>/tmp/.modules "KERNEL-zfs" "-" off 2>/tmp/.modules
if [[ $(cat /tmp/.modules) == "" ]]; then if [[ $(cat /tmp/.modules) == "" ]]; then
return 0 install_base_menu
fi fi
check_for_error "modules: $(cat /tmp/.modules)" check_for_error "modules: $(cat /tmp/.modules)"
for kernel in $(cat ${PACKAGES} | grep -v "base-devel") ; do for kernel in $(cat ${PACKAGES} | grep -v "base-devel") ; do
@ -437,11 +442,12 @@ uefi_bootloader() {
[[ $LUKS_DEV != "" ]] && sed -i "s~rw~$LUKS_DEV rw~g" ${i} [[ $LUKS_DEV != "" ]] && sed -i "s~rw~$LUKS_DEV rw~g" ${i}
done done
;; ;;
*) return 0 *) install_base_menu # Recurse
;; ;;
esac esac
fi fi
install_base_menu # Recurse
} }
# Grub auto-detects installed kernels, etc. Syslinux does not, hence the extra code for it. # Grub auto-detects installed kernels, etc. Syslinux does not, hence the extra code for it.
@ -530,6 +536,7 @@ bios_bootloader() {
fi fi
fi fi
install_base_menu # Recurse
} }
install_bootloader() { install_bootloader() {
@ -573,7 +580,7 @@ install_wireless_packages() {
check_for_error "$FUNCNAME" $? check_for_error "$FUNCNAME" $?
fi fi
install_network_menu install_network_menu # Recurse
} }
install_cups() { install_cups() {
@ -606,7 +613,7 @@ install_cups() {
fi fi
fi fi
install_network_menu install_network_menu # Recurse
} }
install_network_menu() { install_network_menu() {
@ -635,7 +642,7 @@ install_network_menu() {
;; ;;
"4") install_cups "4") install_cups
;; ;;
*) main_menu *) main_menu # Recurse
;; ;;
esac esac
} }
@ -700,7 +707,7 @@ install_xorg_input() {
SUB_MENU="install_vanilla_de_wm" SUB_MENU="install_vanilla_de_wm"
HIGHLIGHT_SUB=1 HIGHLIGHT_SUB=1
install_vanilla_de_wm install_vanilla_de_wm # Recurse
} }
setup_graphics_card() { setup_graphics_card() {
@ -723,6 +730,7 @@ setup_graphics_card() {
fi fi
check_for_error "$FUNCNAME $(cat /tmp/.driver)" "$?" install_graphics_menu check_for_error "$FUNCNAME $(cat /tmp/.driver)" "$?" install_graphics_menu
install_graphics_menu # Recurse
} }
security_menu() { security_menu() {
@ -796,4 +804,5 @@ security_menu() {
;; ;;
esac esac
done done
main_menu # Recurse
} }

@ -71,7 +71,7 @@ install_de_wm() {
fi fi
fi fi
install_vanilla_de_wm install_vanilla_de_wm # Recurse
} }
install_manjaro_de_wm() { install_manjaro_de_wm() {
@ -292,6 +292,8 @@ install_manjaro_de_wm() {
check_for_error "basestrap -i ${MOUNTPOINT} $(cat ${PACKAGES})" "$?" install_desktop_menu check_for_error "basestrap -i ${MOUNTPOINT} $(cat ${PACKAGES})" "$?" install_desktop_menu
fi fi
fi fi
install_desktop_menu # Recurse
} }
install_manjaro_de_wm_pkg() { install_manjaro_de_wm_pkg() {
@ -305,7 +307,7 @@ install_manjaro_de_wm_pkg() {
pacman -Sy --noconfirm $p manjaro-iso-profiles-{base,official,community} 2>$ERR pacman -Sy --noconfirm $p manjaro-iso-profiles-{base,official,community} 2>$ERR
check_for_error "update profiles pkgs" $? install_graphics_menu check_for_error "update profiles pkgs" $? install_graphics_menu
install_manjaro_de_wm install_manjaro_de_wm # Recurse
} }
install_manjaro_de_wm_git() { install_manjaro_de_wm_git() {
@ -327,7 +329,7 @@ install_manjaro_de_wm_git() {
check_for_error "clone profiles repo" $? install_graphics_menu check_for_error "clone profiles repo" $? install_graphics_menu
fi fi
install_manjaro_de_wm install_manjaro_de_wm # Recurse
} }
# Display Manager # Display Manager
@ -375,7 +377,7 @@ install_dm() {
# Show after successfully installing or where attempting to repeat when already completed. # Show after successfully installing or where attempting to repeat when already completed.
[[ $DM_ENABLED -eq 1 ]] && DIALOG " $_DmChTitle " --msgbox "$_DmDoneBody" 0 0 [[ $DM_ENABLED -eq 1 ]] && DIALOG " $_DmChTitle " --msgbox "$_DmDoneBody" 0 0
install_vanilla_de_wm install_vanilla_de_wm # Recurse
} }
enable_dm() { enable_dm() {
@ -466,7 +468,7 @@ install_nm() {
# Show after successfully installing or where attempting to repeat when already completed. # Show after successfully installing or where attempting to repeat when already completed.
[[ $NM_ENABLED -eq 1 ]] && DIALOG " $_InstNMTitle " --msgbox "$_InstNMErrBody" 0 0 [[ $NM_ENABLED -eq 1 ]] && DIALOG " $_InstNMTitle " --msgbox "$_InstNMErrBody" 0 0
install_network_menu install_network_menu # Recurse
} }
enable_nm() { enable_nm() {
@ -516,7 +518,7 @@ install_multimedia_menu() {
esac esac
done done
main_menu main_menu # Recurse
} }
install_alsa_pulse() { install_alsa_pulse() {
@ -552,7 +554,7 @@ install_alsa_pulse() {
check_for_error "$FUNCNAME" "$?" install_multimedia_menu check_for_error "$FUNCNAME" "$?" install_multimedia_menu
fi fi
install_multimedia_menu install_multimedia_menu # Recurse
} }
install_codecs() { install_codecs() {
@ -575,7 +577,7 @@ install_codecs() {
check_for_error "$FUNCNAME" "$?" install_multimedia_menu check_for_error "$FUNCNAME" "$?" install_multimedia_menu
fi fi
install_multimedia_menu install_multimedia_menu # Recurse
} }
install_cust_pkgs() { install_cust_pkgs() {
@ -593,5 +595,5 @@ install_cust_pkgs() {
fi fi
fi fi
install_cust_pkgs install_cust_pkgs # Recurse
} }

@ -1,18 +1,21 @@
main_menu() { main_menu() {
declare -i loopmenu=1 declare -i loopmenu=1
while ((loopmenu)); do while ((loopmenu)); do
if [[ $HIGHLIGHT != 5 ]]; then if [[ $HIGHLIGHT != 9 ]]; then
HIGHLIGHT=$(( HIGHLIGHT + 1 )) HIGHLIGHT=$(( HIGHLIGHT + 1 ))
fi fi
DIALOG " $_MMTitle " --default-item ${HIGHLIGHT} \ DIALOG " $_MMTitle " --default-item ${HIGHLIGHT} \
--menu "$_MMBody" 0 0 6 \ --menu "$_MMBody" 0 0 9 \
"1" "$_PrepMenuTitle|>" \ "1" "$_PrepMenuTitle|>" \
"2" "$_InstBsMenuTitle|>" \ "2" "$_InstBsMenuTitle|>" \
"3" "$_InstGrMenuTitle|>" \ "3" "$_ConfBseMenuTitle|>" \
"4" "$_ConfBseMenuTitle|>" \ "4" "$_InstGrMenuTitle|>" \
"5" "$_SeeConfOptTitle|>" \ "5" "$_InstNMMenuTitle|>" \
"6" "$_Done" 2>${ANSWER} "6" "$_InstMultMenuTitle|>" \
"7" "$_SecMenuTitle|>" \
"8" "$_SeeConfOptTitle|>" \
"9" "$_Done" 2>${ANSWER}
HIGHLIGHT=$(cat ${ANSWER}) HIGHLIGHT=$(cat ${ANSWER})
case $(cat ${ANSWER}) in case $(cat ${ANSWER}) in
@ -20,11 +23,17 @@ main_menu() {
;; ;;
"2") check_mount && install_base_menu "2") check_mount && install_base_menu
;; ;;
"3") check_base && install_graphics_menu "3") check_base && config_base_menu
;; ;;
"4") check_base && config_base_menu "4") check_base && install_graphics_menu
;; ;;
"5") check_base && edit_configs "5") check_base && install_network_menu
;;
"6") check_base && install_multimedia_menu
;;
"7") check_base && security_menu
;;
"8") check_base && edit_configs
;; ;;
*) loopmenu=0 *) loopmenu=0
exit_done exit_done
@ -36,8 +45,7 @@ main_menu() {
# Preparation # Preparation
prep_menu() { prep_menu() {
local PARENT="$FUNCNAME" local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
submenu 7 submenu 7
DIALOG "$_PrepMenuTitle " --default-item ${HIGHLIGHT_SUB} \ DIALOG "$_PrepMenuTitle " --default-item ${HIGHLIGHT_SUB} \
--menu "$_PrepMenuBody" 0 0 7 \ --menu "$_PrepMenuBody" 0 0 7 \
@ -65,18 +73,15 @@ prep_menu() {
;; ;;
"6") mount_partitions "6") mount_partitions
;; ;;
*) loopmenu=0 *) return 0
return 0
;; ;;
esac esac
done
} }
# Base Installation # Base Installation
install_base_menu() { install_base_menu() {
local PARENT="$FUNCNAME" local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
submenu 5 submenu 5
DIALOG " $_InstBsMenuTitle " --default-item ${HIGHLIGHT_SUB} --menu "$_InstBseMenuBody" 0 0 5 \ DIALOG " $_InstBsMenuTitle " --default-item ${HIGHLIGHT_SUB} --menu "$_InstBseMenuBody" 0 0 5 \
"1" "$_PrepMirror" \ "1" "$_PrepMirror" \
@ -99,18 +104,15 @@ install_base_menu() {
;; ;;
"4") install_bootloader "4") install_bootloader
;; ;;
*) loopmenu=0 *) return 0
return 0
;; ;;
esac esac
done
} }
# Base Configuration # Base Configuration
config_base_menu() { config_base_menu() {
local PARENT="$FUNCNAME" local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
submenu 8 submenu 8
DIALOG "$_ConfBseBody" --default-item ${HIGHLIGHT_SUB} --menu " $_ConfBseMenuTitle " \ DIALOG "$_ConfBseBody" --default-item ${HIGHLIGHT_SUB} --menu " $_ConfBseMenuTitle " \
0 0 8 \ 0 0 8 \
@ -140,17 +142,14 @@ config_base_menu() {
;; ;;
"7") run_mkinitcpio "7") run_mkinitcpio
;; ;;
*) loopmenu=0 *) return 0
return 0
;; ;;
esac esac
done
} }
install_graphics_menu() { install_graphics_menu() {
local PARENT="$FUNCNAME" local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
submenu 4 submenu 4
DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \
--menu "$_InstGrMenuBody" 0 0 4 \ --menu "$_InstGrMenuBody" 0 0 4 \
@ -163,21 +162,18 @@ install_graphics_menu() {
case $(cat ${ANSWER}) in case $(cat ${ANSWER}) in
"1") setup_graphics_card "1") setup_graphics_card
;; ;;
"2") install_manjaro_de_wm_pkg "2") install_desktop_menu
;; ;;
"3") set_xkbmap "3") set_xkbmap
;; ;;
*) loopmenu=0 *) return 0
return 0
;; ;;
esac esac
done
} }
install_vanilla_de_wm() { install_vanilla_de_wm() {
local PARENT="$FUNCNAME" local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
submenu 4 submenu 4
DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \
--menu "$_InstGrMenuBody" 0 0 4 \ --menu "$_InstGrMenuBody" 0 0 4 \
@ -194,17 +190,14 @@ install_vanilla_de_wm() {
;; ;;
"3") install_dm "3") install_dm
;; ;;
*) loopmenu=0 *) return 0
return 0
;; ;;
esac esac
done
} }
install_desktop_menu() { install_desktop_menu() {
local PARENT="$FUNCNAME" local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
submenu 4 submenu 4
DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \
--menu "$_InstDEMenuTitle" 0 0 4 \ --menu "$_InstDEMenuTitle" 0 0 4 \
@ -221,11 +214,9 @@ install_desktop_menu() {
;; ;;
"3") install_vanilla_de_wm "3") install_vanilla_de_wm
;; ;;
*) loopmenu=0 *) return 0
return 0
;; ;;
esac esac
done
} }
# Install Accessibility Applications # Install Accessibility Applications

Loading…
Cancel
Save