Mark all parts where recursion happens

merge-requests/273/head
Chrysostomus 8 years ago
parent fdd563a5f8
commit c0f8bde5f5

@ -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,17 +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 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
@ -169,17 +169,17 @@ set_root_password() {
set_root_password set_root_password
fi fi
config_base_menu 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
@ -228,7 +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 config_base_menu # Recurse
} }
run_mkinitcpio() { run_mkinitcpio() {
@ -241,9 +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 config_base_menu # Recurse
} }
install_base() { install_base() {
@ -277,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
@ -442,12 +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
;; ;;
*) install_base_menu *) install_base_menu # Recurse
;; ;;
esac esac
fi fi
install_base_menu 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.
@ -536,7 +536,7 @@ bios_bootloader() {
fi fi
fi fi
install_base_menu install_base_menu # Recurse
} }
install_bootloader() { install_bootloader() {
@ -580,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() {
@ -613,7 +613,7 @@ install_cups() {
fi fi
fi fi
install_network_menu install_network_menu # Recurse
} }
install_network_menu() { install_network_menu() {
@ -642,7 +642,7 @@ install_network_menu() {
;; ;;
"4") install_cups "4") install_cups
;; ;;
*) main_menu *) main_menu # Recurse
;; ;;
esac esac
} }
@ -707,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() {
@ -730,7 +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 install_graphics_menu # Recurse
} }
security_menu() { security_menu() {
@ -804,5 +804,5 @@ security_menu() {
;; ;;
esac esac
done done
main_menu 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() {
@ -293,7 +293,7 @@ install_manjaro_de_wm() {
fi fi
fi fi
install_desktop_menu install_desktop_menu # Recurse
} }
install_manjaro_de_wm_pkg() { install_manjaro_de_wm_pkg() {
@ -307,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() {
@ -329,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
@ -377,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() {
@ -468,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() {
@ -518,7 +518,7 @@ install_multimedia_menu() {
esac esac
done done
main_menu main_menu # Recurse
} }
install_alsa_pulse() { install_alsa_pulse() {
@ -554,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() {
@ -577,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() {
@ -595,5 +595,5 @@ install_cust_pkgs() {
fi fi
fi fi
install_cust_pkgs install_cust_pkgs # Recurse
} }

@ -48,7 +48,7 @@ create_partitions() {
fi fi
fi fi
prep_menu prep_menu # Recurse
} }
# Securely destroy all data on a given device. # Securely destroy all data on a given device.
@ -70,7 +70,7 @@ secure_wipe() {
#dd if=/dev/zero | pv | dd of=${DEVICE} iflag=nocache oflag=direct bs=4096 2>$ERR #dd if=/dev/zero | pv | dd of=${DEVICE} iflag=nocache oflag=direct bs=4096 2>$ERR
check_for_error "wipe -Ifre ${DEVICE}" $? create_partitions check_for_error "wipe -Ifre ${DEVICE}" $? create_partitions
else else
create_partitions create_partitions # Recurse
fi fi
} }
@ -117,7 +117,7 @@ auto_partition() {
lsblk ${DEVICE} -o NAME,TYPE,FSTYPE,SIZE > /tmp/.devlist lsblk ${DEVICE} -o NAME,TYPE,FSTYPE,SIZE > /tmp/.devlist
DIALOG "" --textbox /tmp/.devlist 0 0 DIALOG "" --textbox /tmp/.devlist 0 0
else else
create_partitions create_partitions # Recurse
fi fi
} }
@ -214,7 +214,7 @@ confirm_mount() {
else else
DIALOG " $_MntStatusTitle " --infobox "$_MntStatusFail" 0 0 DIALOG " $_MntStatusTitle " --infobox "$_MntStatusFail" 0 0
sleep 2 sleep 2
prep_menu prep_menu # Recurse
fi fi
} }
@ -292,7 +292,7 @@ select_filesystem() {
${FILESYSTEM} ${PARTITION} >/dev/null 2>$ERR ${FILESYSTEM} ${PARTITION} >/dev/null 2>$ERR
check_for_error "mount $PARTITION as $FILESYSTEM." $? select_filesystem check_for_error "mount $PARTITION as $FILESYSTEM." $? select_filesystem
else else
select_filesystem select_filesystem # Recurse
fi fi
fi fi
} }
@ -485,7 +485,7 @@ luks_open() {
lsblk -o NAME,TYPE,FSTYPE,SIZE,MOUNTPOINT ${PARTITION} | grep "crypt\|NAME\|MODEL\|TYPE\|FSTYPE\|SIZE" > /tmp/.devlist lsblk -o NAME,TYPE,FSTYPE,SIZE,MOUNTPOINT ${PARTITION} | grep "crypt\|NAME\|MODEL\|TYPE\|FSTYPE\|SIZE" > /tmp/.devlist
DIALOG " $_DevShowOpt " --textbox /tmp/.devlist 0 0 DIALOG " $_DevShowOpt " --textbox /tmp/.devlist 0 0
luks_menu luks_menu # Recurse
} }
luks_setup() { luks_setup() {
@ -535,7 +535,7 @@ luks_show() {
lsblk -o NAME,TYPE,FSTYPE,SIZE ${PARTITION} | grep "part\|crypt\|NAME\|TYPE\|FSTYPE\|SIZE" >> /tmp/.devlist lsblk -o NAME,TYPE,FSTYPE,SIZE ${PARTITION} | grep "part\|crypt\|NAME\|TYPE\|FSTYPE\|SIZE" >> /tmp/.devlist
DIALOG " $_LuksEncrypt " --textbox /tmp/.devlist 0 0 DIALOG " $_LuksEncrypt " --textbox /tmp/.devlist 0 0
luks_menu luks_menu # Recurse
} }
luks_menu() { luks_menu() {
@ -562,7 +562,7 @@ luks_menu() {
;; ;;
esac esac
prep_menu prep_menu # Recurse
} }
lvm_detect() { lvm_detect() {
@ -590,12 +590,12 @@ lvm_show_vg() {
# If no VGs, no point in continuing # If no VGs, no point in continuing
if [[ $VG_LIST == "" ]]; then if [[ $VG_LIST == "" ]]; then
DIALOG " $_ErrTitle " --msgbox "$_LvmVGErr" 0 0 DIALOG " $_ErrTitle " --msgbox "$_LvmVGErr" 0 0
lvm_menu lvm_menu # Recurse
fi fi
# Select VG # Select VG
DIALOG " $_PrepLVM " --menu "$_LvmSelVGBody" 0 0 5 \ DIALOG " $_PrepLVM " --menu "$_LvmSelVGBody" 0 0 5 \
${VG_LIST} 2>${ANSWER} || lvm_menu ${VG_LIST} 2>${ANSWER} || lvm_menu # Recurse
} }
# Create Volume Group and Logical Volumes # Create Volume Group and Logical Volumes
@ -769,7 +769,7 @@ lvm_del_vg() {
vgremove -f $(cat ${ANSWER}) >/dev/null 2>&1 vgremove -f $(cat ${ANSWER}) >/dev/null 2>&1
fi fi
lvm_menu lvm_menu # Recurse
} }
lvm_del_all() { lvm_del_all() {
@ -795,7 +795,7 @@ lvm_del_all() {
done done
fi fi
lvm_menu lvm_menu # Recurse
} }
lvm_menu() { lvm_menu() {
@ -816,7 +816,7 @@ lvm_menu() {
*) prep_menu ;; *) prep_menu ;;
esac esac
prep_menu prep_menu # Recurse
} }
mount_partitions() { mount_partitions() {
@ -918,5 +918,5 @@ mount_partitions() {
fi fi
done done
prep_menu prep_menu # Recurse
} }

Loading…
Cancel
Save