From 3d40b140cb3a20172a7a0afc3e5a98c9e8312028 Mon Sep 17 00:00:00 2001 From: Bernhard Landauer Date: Tue, 28 Feb 2017 23:53:26 +0100 Subject: [PATCH] attempt new non-recursive structure --- bin/manjaro-architect.in | 5 +- lib/util-base.sh | 23 +- lib/util-desktop.sh | 193 ++++++------ lib/util-disk.sh | 28 +- lib/util-menu.sh | 632 ++++++++++++++++++++------------------- lib/util.sh | 71 ++--- 6 files changed, 473 insertions(+), 479 deletions(-) diff --git a/bin/manjaro-architect.in b/bin/manjaro-architect.in index 00ff03f..ec043cc 100644 --- a/bin/manjaro-architect.in +++ b/bin/manjaro-architect.in @@ -27,7 +27,4 @@ select_language mk_connection check_requirements greeting - -while true; do - main_menu_online -done +main_menu diff --git a/lib/util-base.sh b/lib/util-base.sh index 18cbbe8..4ba396f 100644 --- a/lib/util-base.sh +++ b/lib/util-base.sh @@ -90,7 +90,7 @@ set_hw_clock() { if [[ $(cat ${ANSWER}) != "" ]]; then arch_chroot "hwclock --systohc --$(cat ${ANSWER})" 2>$ERR - check_for_error "$FUNCNAME" "$?" + check_for_error "$FUNCNAME" "$?" config_base_menu fi } @@ -112,11 +112,9 @@ generate_fstab() { [[ -f ${MOUNTPOINT}/swapfile ]] && sed -i "s/\\${MOUNTPOINT}//" ${MOUNTPOINT}/etc/fstab fi fi - config_base_menu } -boot_encrypted_setting() -{ +boot_encrypted_setting() { # Check if there is separate encrypted /boot partition if $(lsblk | grep '/mnt/boot' | grep -q 'crypt' ); then echo "GRUB_ENABLE_CRYPTODISK=y" >> /mnt/etc/default/grub @@ -134,7 +132,7 @@ set_hostname() { echo "$(cat ${ANSWER})" > ${MOUNTPOINT}/etc/hostname 2>$ERR echo -e "#\t\t\n127.0.0.1\tlocalhost.localdomain\tlocalhost\t$(cat \ ${ANSWER})\n::1\tlocalhost.localdomain\tlocalhost\t$(cat ${ANSWER})" > ${MOUNTPOINT}/etc/hosts 2>$ERR - check_for_error "$FUNCNAME" 0 config_base_menu + check_for_error "$FUNCNAME" 0 } # Adapted and simplified from the Manjaro 0.8 and Antergos 2.0 installers @@ -217,7 +215,6 @@ create_new_user() { run_mkinitcpio() { clear - KERNEL="" # If LVM and/or LUKS used, add the relevant hook(s) @@ -226,7 +223,7 @@ 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" $?; } arch_chroot "mkinitcpio -P" 2>$ERR - check_for_error "$FUNCNAME" "$?" + check_for_error "$FUNCNAME" "$?" config_base_menu } install_base() { @@ -617,11 +614,9 @@ install_network_menu() { ;; "4") install_cups ;; - *) main_menu_online + *) main_menu ;; esac - - install_network_menu } install_intel() { @@ -707,9 +702,7 @@ setup_graphics_card() { sed -i 's/MODULES=""/MODULES="nouveau"/' ${MOUNTPOINT}/etc/mkinitcpio.conf fi - check_for_error "$FUNCNAME $(cat /tmp/.driver)" "$?" - - install_graphics_menu + check_for_error "$FUNCNAME $(cat /tmp/.driver)" "$?" install_graphics_menu } security_menu() { @@ -777,9 +770,7 @@ security_menu() { || DIALOG " $_SeeConfErrTitle " --msgbox "$_SeeConfErrBody1" 0 0 ;; esac ;; - *) main_menu_online + *) main_menu ;; esac - - security_menu } diff --git a/lib/util-desktop.sh b/lib/util-desktop.sh index 753ae56..57aad4e 100644 --- a/lib/util-desktop.sh +++ b/lib/util-desktop.sh @@ -67,7 +67,7 @@ install_de_wm() { if [[ $(cat ${PACKAGES}) != "" ]]; then clear basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR - check_for_error "basestrap ${MOUNTPOINT} $(cat ${PACKAGES})" "$?" + check_for_error "basestrap ${MOUNTPOINT} $(cat ${PACKAGES})" "$?" install_vanilla_de_wm fi fi } @@ -177,14 +177,11 @@ install_manjaro_de_wm() { check_for_error "packages to install: $(grep -v -f /mnt/.base /tmp/.edition | sort | uniq | tr '\n' ' ')" - - - clear # remove already installed base pkgs and # basestrap the parsed package list to the new root basestrap -i ${MOUNTPOINT} $(grep -v -f /mnt/.base /tmp/.edition | sort | uniq) 2>$ERR - check_for_error "install pkgs: $(cat /tmp/.desktop)" "$?" + check_for_error "install pkgs: $(cat /tmp/.desktop)" "$?" install_desktop_menu # copy the profile overlay to the new root echo "Copying overlay files to the new root" @@ -193,7 +190,7 @@ install_manjaro_de_wm() { # Copy settings to root account cp -ar $MOUNTPOINT/etc/skel/. $MOUNTPOINT/root/ 2>$ERR - check_for_error "copy root config" "$?" + check_for_error "copy root config" "$?" install_desktop_menu # copy settings to already created users if [[ -e "$(echo /mnt/home/*)" ]]; then @@ -288,7 +285,7 @@ install_manjaro_de_wm() { if [[ $(cat ${PACKAGES}) != "" ]]; then clear basestrap -i ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR - check_for_error "basestrap -i ${MOUNTPOINT} $(cat ${PACKAGES})" "$?" + check_for_error "basestrap -i ${MOUNTPOINT} $(cat ${PACKAGES})" "$?" install_desktop_menu fi fi } @@ -308,8 +305,6 @@ install_manjaro_de_wm_pkg() { pacman -Sy --noconfirm $p 2>$ERR check_for_error "update profiles pkgs" $? install_graphics_menu done - - install_manjaro_de_wm } install_manjaro_de_wm_git() { @@ -330,8 +325,6 @@ install_manjaro_de_wm_git() { git clone --depth 1 https://github.com/manjaro/iso-profiles.git $PROFILES 2>$ERR check_for_error "clone profiles repo" $? install_graphics_menu fi - - install_manjaro_de_wm } # Display Manager @@ -441,8 +434,7 @@ install_nm() { arch_chroot "systemctl enable $(cat ${PACKAGES})" 2>$ERR fi fi - - check_for_error "$FUNCNAME" "$?" + check_for_error "$FUNCNAME" "$?" install_network_menu NM_ENABLED=1 } @@ -478,6 +470,7 @@ install_nm() { # Where networkmanager selected, add network-manager-applet sed -i 's/NetworkManager/networkmanager network-manager-applet/g' ${PACKAGES} basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR + check_for_error "$FUNCNAME" "$?" install_network_menu # Where networkmanager selected, now remove network-manager-applet sed -i 's/networkmanager network-manager-applet/NetworkManager/g' ${PACKAGES} @@ -491,100 +484,102 @@ install_nm() { } install_multimedia_menu() { - local PARENT="$FUNCNAME" - - install_alsa_pulse() { - # Prep Variables - echo "" > ${PACKAGES} - ALSA="" - PULSE_EXTRA="" - alsa=$(pacman -Ss alsa | awk '{print $1}' | grep "/alsa-" | sed "s/extra\///g" | sort -u) - pulse_extra=$(pacman -Ss pulseaudio- | awk '{print $1}' | sed "s/extra\///g" | grep "pulseaudio-" | sort -u) - - for i in ${alsa}; do - ALSA="${ALSA} ${i} - off" - done + declare -i loopmenu=1 + while ((loopmenu)); do + local PARENT="$FUNCNAME" + + submenu 5 + DIALOG "$_InstMultMenuBody" --default-item ${HIGHLIGHT_SUB} --menu " $_InstMultMenuTitle " 0 0 5 \ + "1" "$_InstMulSnd" \ + "2" "$_InstMulCodec" \ + "3" "$_InstMulAcc" \ + "4" "$_InstMulCust" \ + "5" "$_Back" 2>${ANSWER} + + HIGHLIGHT_SUB=$(cat ${ANSWER}) + case $(cat ${ANSWER}) in + "1") install_alsa_pulse + ;; + "2") install_codecs + ;; + "3") install_acc_menu + ;; + "4") install_cust_pkgs + ;; + *) loopmenu=0 + ;; + esac + done + install_multimedia_menu +} - ALSA=$(echo $ALSA | sed "s/alsa-utils - off/alsa-utils - on/g" | sed "s/alsa-plugins - off/alsa-plugins - on/g") +install_alsa_pulse() { + # Prep Variables + echo "" > ${PACKAGES} + ALSA="" + PULSE_EXTRA="" + alsa=$(pacman -Ss alsa | awk '{print $1}' | grep "/alsa-" | sed "s/extra\///g" | sort -u) + pulse_extra=$(pacman -Ss pulseaudio- | awk '{print $1}' | sed "s/extra\///g" | grep "pulseaudio-" | sort -u) - for i in ${pulse_extra}; do - PULSE_EXTRA="${PULSE_EXTRA} ${i} - off" - done + for i in ${alsa}; do + ALSA="${ALSA} ${i} - off" + done - DIALOG " $_InstMulSnd " --checklist "$_InstMulSndBody\n\n$_UseSpaceBar" 0 0 6 \ - $ALSA "pulseaudio" "-" off $PULSE_EXTRA \ - "paprefs" "pulseaudio GUI" off \ - "pavucontrol" "pulseaudio GUI" off \ - "ponymix" "pulseaudio CLI" off \ - "volumeicon" "ALSA GUI" off \ - "volwheel" "ASLA GUI" off 2>${PACKAGES} + ALSA=$(echo $ALSA | sed "s/alsa-utils - off/alsa-utils - on/g" | sed "s/alsa-plugins - off/alsa-plugins - on/g") - clear - # If at least one package, install. - if [[ $(cat ${PACKAGES}) != "" ]]; then - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR - check_for_error "$FUNCNAME" "$?" - fi - } + for i in ${pulse_extra}; do + PULSE_EXTRA="${PULSE_EXTRA} ${i} - off" + done - install_codecs() { - # Prep Variables - echo "" > ${PACKAGES} - GSTREAMER="" - gstreamer=$(pacman -Ss gstreamer | awk '{print $1}' | grep "/gstreamer" | sed "s/extra\///g" | sed "s/community\///g" | sort -u) - echo $gstreamer - for i in ${gstreamer}; do - GSTREAMER="${GSTREAMER} ${i} - off" - done + DIALOG " $_InstMulSnd " --checklist "$_InstMulSndBody\n\n$_UseSpaceBar" 0 0 6 \ + $ALSA "pulseaudio" "-" off $PULSE_EXTRA \ + "paprefs" "pulseaudio GUI" off \ + "pavucontrol" "pulseaudio GUI" off \ + "ponymix" "pulseaudio CLI" off \ + "volumeicon" "ALSA GUI" off \ + "volwheel" "ASLA GUI" off 2>${PACKAGES} - DIALOG " $_InstMulCodec " --checklist "$_InstMulCodBody\n\n$_UseSpaceBar" 0 0 14 \ - $GSTREAMER "xine-lib" "-" off 2>${PACKAGES} + clear + # If at least one package, install. + if [[ $(cat ${PACKAGES}) != "" ]]; then + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR + check_for_error "$FUNCNAME" "$?" install_multimedia_menu + fi +} - clear - # If at least one package, install. - if [[ $(cat ${PACKAGES}) != "" ]]; then - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR - check_for_error "$FUNCNAME" "$?" - fi - } +install_codecs() { + # Prep Variables + echo "" > ${PACKAGES} + GSTREAMER="" + gstreamer=$(pacman -Ss gstreamer | awk '{print $1}' | grep "/gstreamer" | sed "s/extra\///g" | sed "s/community\///g" | sort -u) + echo $gstreamer + for i in ${gstreamer}; do + GSTREAMER="${GSTREAMER} ${i} - off" + done - install_cust_pkgs() { - echo "" > ${PACKAGES} - DIALOG " $_InstMulCust " --inputbox "$_InstMulCustBody" 0 0 "" 2>${PACKAGES} || install_multimedia_menu + DIALOG " $_InstMulCodec " --checklist "$_InstMulCodBody\n\n$_UseSpaceBar" 0 0 14 \ + $GSTREAMER "xine-lib" "-" off 2>${PACKAGES} - clear - # If at least one package, install. - if [[ $(cat ${PACKAGES}) != "" ]]; then - if [[ $(cat ${PACKAGES}) == "hen poem" ]]; then - DIALOG " \"My Sweet Buckies\" by Atiya & Carl " --msgbox "\nMy Sweet Buckies,\nYou are the sweetest Buckies that ever did \"buck\",\nLily, Rosie, Trumpet, and Flute,\nMy love for you all is absolute!\n\nThey buck: \"We love our treats, we are the Booyakka sisters,\"\n\"Sometimes we squabble and give each other comb-twisters,\"\n\"And in our garden we love to sunbathe, forage, hop and jump,\"\n\"We love our freedom far, far away from that factory farm dump,\"\n\n\"For so long we were trapped in cramped prisons full of disease,\"\n\"No sunlight, no fresh air, no one who cared for even our basic needs,\"\n\"We suffered in fear, pain, and misery for such a long time,\"\n\"But now we are so happy, we wanted to tell you in this rhyme!\"\n\n" 0 0 - else - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR - check_for_error "$FUNCNAME $(cat ${PACKAGES})" "$?" - fi - fi - } + clear + # If at least one package, install. + if [[ $(cat ${PACKAGES}) != "" ]]; then + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR + check_for_error "$FUNCNAME" "$?" install_multimedia_menu + fi +} - submenu 5 - DIALOG "$_InstMultMenuBody" --default-item ${HIGHLIGHT_SUB} --menu " $_InstMultMenuTitle " 0 0 5 \ - "1" "$_InstMulSnd" \ - "2" "$_InstMulCodec" \ - "3" "$_InstMulAcc" \ - "4" "$_InstMulCust" \ - "5" "$_Back" 2>${ANSWER} - - HIGHLIGHT_SUB=$(cat ${ANSWER}) - case $(cat ${ANSWER}) in - "1") install_alsa_pulse - ;; - "2") install_codecs - ;; - "3") install_acc_menu - ;; - "4") install_cust_pkgs - ;; - *) main_menu_online - ;; - esac +install_cust_pkgs() { + echo "" > ${PACKAGES} + DIALOG " $_InstMulCust " --inputbox "$_InstMulCustBody" 0 0 "" 2>${PACKAGES} || install_multimedia_menu - install_multimedia_menu -} + clear + # If at least one package, install. + if [[ $(cat ${PACKAGES}) != "" ]]; then + if [[ $(cat ${PACKAGES}) == "hen poem" ]]; then + DIALOG " \"My Sweet Buckies\" by Atiya & Carl " --msgbox "\nMy Sweet Buckies,\nYou are the sweetest Buckies that ever did \"buck\",\nLily, Rosie, Trumpet, and Flute,\nMy love for you all is absolute!\n\nThey buck: \"We love our treats, we are the Booyakka sisters,\"\n\"Sometimes we squabble and give each other comb-twisters,\"\n\"And in our garden we love to sunbathe, forage, hop and jump,\"\n\"We love our freedom far, far away from that factory farm dump,\"\n\n\"For so long we were trapped in cramped prisons full of disease,\"\n\"No sunlight, no fresh air, no one who cared for even our basic needs,\"\n\"We suffered in fear, pain, and misery for such a long time,\"\n\"But now we are so happy, we wanted to tell you in this rhyme!\"\n\n" 0 0 + else + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR + check_for_error "$FUNCNAME $(cat ${PACKAGES})" "$?" install_multimedia_menu + fi + fi +} \ No newline at end of file diff --git a/lib/util-disk.sh b/lib/util-disk.sh index 033c4b0..9b5337b 100644 --- a/lib/util-disk.sh +++ b/lib/util-disk.sh @@ -4,10 +4,10 @@ umount_partitions() { MOUNTED=$(mount | grep "${MOUNTPOINT}" | awk '{print $3}' | sort -r) swapoff -a - # for i in ${MOUNTED[@]}; do - # local err=$(umount $i >/dev/null 2>$ERR) - # (( err !=0 )) && check_for_error "$FUNCNAME $i" $err - # done + for i in ${MOUNTED[@]}; do + local err=$(umount $i >/dev/null 2>$ERR) + (( err !=0 )) && check_for_error "$FUNCNAME $i" $err + done } # This function does not assume that the formatted device is the Root installation device as @@ -45,8 +45,6 @@ create_partitions() { [[ $(cat ${ANSWER}) == "$_PartOptAuto" ]] && auto_partition fi fi - - prep_menu } # Securely destroy all data on a given device. @@ -58,7 +56,7 @@ secure_wipe() { # Install wipe where not already installed. Much faster than dd if [[ ! -e /usr/bin/wipe ]]; then pacman -Sy --noconfirm wipe 2>$ERR - check_for_error "install wipe" $? + check_for_error "install wipe" $? create_partitions fi clear @@ -66,7 +64,7 @@ secure_wipe() { # Alternate dd command - requires pv to be installed #dd if=/dev/zero | pv | dd of=${DEVICE} iflag=nocache oflag=direct bs=4096 2>$ERR - check_for_error "wipe -Ifre ${DEVICE}" $? + check_for_error "wipe -Ifre ${DEVICE}" $? create_partitions else create_partitions fi @@ -83,7 +81,7 @@ auto_partition() { for del_part in $(tac /tmp/.del_parts); do parted -s ${DEVICE} rm ${del_part} 2>$ERR - check_for_error "parted -s ${DEVICE} rm ${del_part}" $? + check_for_error "parted -s ${DEVICE} rm ${del_part}" $? create_partitions done # Identify the partition table @@ -92,11 +90,11 @@ auto_partition() { # Create partition table if one does not already exist if [[ $SYSTEM == "BIOS" ]] && [[ $part_table != "msdos" ]] ; then parted -s ${DEVICE} mklabel msdos 2>$ERR - check_for_error "${DEVICE} mklabel msdos" $? + check_for_error "${DEVICE} mklabel msdos" $? create_partitions fi if [[ $SYSTEM == "UEFI" ]] && [[ $part_table != "gpt" ]] ; then parted -s ${DEVICE} mklabel gpt 2>$ERR - check_for_error "${DEVICE} mklabel gpt" $? + check_for_error "${DEVICE} mklabel gpt" $? create_partitions fi # Create partitions (same basic partitioning scheme for BIOS and UEFI) @@ -109,7 +107,7 @@ auto_partition() { parted -s ${DEVICE} set 1 boot on 2>$ERR check_for_error "set boot flag for ${DEVICE}" $? parted -s ${DEVICE} mkpart primary ext3 513MiB 100% 2>$ERR - check_for_error "parted -s ${DEVICE} mkpart primary ext3 513MiB 100%" $? + check_for_error "parted -s ${DEVICE} mkpart primary ext3 513MiB 100%" $? create_partitions # Show created partitions lsblk ${DEVICE} -o NAME,TYPE,FSTYPE,SIZE > /tmp/.devlist @@ -288,7 +286,7 @@ select_filesystem() { DIALOG " $_FSTitle " --yesno "\n$_FSMount $FILESYSTEM\n\n! $_FSWarn1 $PARTITION $_FSWarn2 !\n\n" 0 0 if (( $? != 1 )); then ${FILESYSTEM} ${PARTITION} >/dev/null 2>$ERR - check_for_error "mount $PARTITION as $FILESYSTEM." $? + check_for_error "mount $PARTITION as $FILESYSTEM." $? select_filesystem else select_filesystem fi @@ -858,11 +856,11 @@ mount_partitions() { if [[ $(fsck -N $PARTITION | grep fat) ]]; then DIALOG " $_PrepMntPart " --yesno "$_FormUefiBody $PARTITION $_FormUefiBody2" 0 0 && { mkfs.vfat -F32 ${PARTITION} >/dev/null 2>$ERR - check_for_error "mkfs.vfat -F32 ${PARTITION}" "$?" + check_for_error "mkfs.vfat -F32 ${PARTITION}" "$?" prep_menu } else mkfs.vfat -F32 ${PARTITION} >/dev/null 2>$ERR - check_for_error "mkfs.vfat -F32 ${PARTITION}" "$?" + check_for_error "mkfs.vfat -F32 ${PARTITION}" "$?" prep_menu fi # Inform users of the mountpoint options and consequences diff --git a/lib/util-menu.sh b/lib/util-menu.sh index c2187b4..15c1f8e 100644 --- a/lib/util-menu.sh +++ b/lib/util-menu.sh @@ -1,262 +1,271 @@ -main_menu_online() { - if [[ $HIGHLIGHT != 9 ]]; then - HIGHLIGHT=$(( HIGHLIGHT + 1 )) - fi +main_menu() { + declare -i loopmenu=1 + while ((loopmenu)); do + if [[ $HIGHLIGHT != 9 ]]; then + HIGHLIGHT=$(( HIGHLIGHT + 1 )) + fi - DIALOG " $_MMTitle " --default-item ${HIGHLIGHT} \ - --menu "$_MMBody" 0 0 9 \ - "1" "$_PrepMenuTitle|>" \ - "2" "$_InstBsMenuTitle|>" \ - "3" "$_InstGrMenuTitle|>" \ - "4" "$_ConfBseMenuTitle|>" \ - "5" "$_InstNMMenuTitle|>" \ - "6" "$_InstMultMenuTitle|>" \ - "7" "$_SecMenuTitle|>" \ - "8" "$_SeeConfOptTitle|>" \ - "9" "$_Done" 2>${ANSWER} - - HIGHLIGHT=$(cat ${ANSWER}) - - # Depending on the answer, first check whether partition(s) are mounted and whether base has been installed - if [[ $(cat ${ANSWER}) -eq 2 ]]; then - check_mount - fi + DIALOG " $_MMTitle " --default-item ${HIGHLIGHT} \ + --menu "$_MMBody" 0 0 9 \ + "1" "$_PrepMenuTitle|>" \ + "2" "$_InstBsMenuTitle|>" \ + "3" "$_ConfBseMenuTitle|>" \ + "4" "$_InstGrMenuTitle|>" \ + "5" "$_InstNMMenuTitle|>" \ + "6" "$_InstMultMenuTitle|>" \ + "7" "$_SecMenuTitle|>" \ + "8" "$_SeeConfOptTitle|>" \ + "9" "$_Done" 2>${ANSWER} + + HIGHLIGHT=$(cat ${ANSWER}) + + # Depending on the answer, first check whether partition(s) are mounted and whether base has been installed + if [[ $(cat ${ANSWER}) -eq 2 ]]; then + check_mount + fi - if [[ $(cat ${ANSWER}) -ge 3 ]] && [[ $(cat ${ANSWER}) -le 8 ]]; then - check_mount - check_base - fi + if [[ $(cat ${ANSWER}) -ge 3 ]] && [[ $(cat ${ANSWER}) -le 8 ]]; then + check_mount + check_base + fi - case $(cat ${ANSWER}) in - "1") prep_menu - ;; - "2") install_base_menu - ;; - "3") install_graphics_menu - ;; - "4") config_base_menu - ;; - "5") install_network_menu - ;; - "6") install_multimedia_menu - ;; - "7") security_menu - ;; - "8") edit_configs - ;; - *) final_check - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "$_CloseInstBody $(cat ${CHECKLIST})" 0 0 - if [[ $? -eq 0 ]]; then - echo "exit installer." >> ${LOGFILE} - if [[ -e /mnt/usr ]]; then - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "\n$_LogInfo\n" 0 0 - if [[ $? -eq 0 ]]; then - [[ -e /mnt/.m-a.log ]] && cat ${LOGFILE} >> /mnt/.m-a.log - cp ${LOGFILE} /mnt/.m-a.log - fi + case $(cat ${ANSWER}) in + "1") prep_menu + ;; + "2") install_base_menu + ;; + "3") config_base_menu + ;; + "4") install_graphics_menu + ;; + "5") install_network_menu + ;; + "6") install_multimedia_menu + ;; + "7") security_menu + ;; + "8") edit_configs + ;; + *) final_check + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "$_CloseInstBody $(cat ${CHECKLIST})" 0 0 + if [[ $? -eq 0 ]]; then + echo "exit installer." >> ${LOGFILE} + if [[ -e /mnt/usr ]]; then + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "\n$_LogInfo\n" 0 0 + if [[ $? -eq 0 ]]; then + [[ -e /mnt/.m-a.log ]] && cat ${LOGFILE} >> /mnt/.m-a.log + cp ${LOGFILE} /mnt/.m-a.log + fi + fi + umount_partitions + clear + loopmenu=0 fi - umount_partitions - clear - exit 0 - fi - ;; - esac + ;; + esac - main_menu_online + done } # Preparation prep_menu() { - local PARENT="$FUNCNAME" - - submenu 7 - DIALOG "$_PrepMenuTitle " --default-item ${HIGHLIGHT_SUB} \ - --menu "$_PrepMenuBody" 0 0 7 \ - "1" "$_VCKeymapTitle" \ - "2" "$_DevShowOpt" \ - "3" "$_PrepPartDisk" \ - "4" "$_PrepLUKS" \ - "5" "$_PrepLVM $_PrepLVM2" \ - "6" "$_PrepMntPart" \ - "7" "$_Back" 2>${ANSWER} - - HIGHLIGHT_SUB=$(cat ${ANSWER}) - case $(cat ${ANSWER}) in - "1") set_keymap - ;; - "2") show_devices - ;; - "3") umount_partitions - select_device - create_partitions - ;; - "4") luks_menu - ;; - "5") lvm_menu - ;; - "6") mount_partitions - ;; - *) main_menu_online - ;; - esac - - prep_menu + declare -i loopmenu=1 + while ((loopmenu)); do + local PARENT="$FUNCNAME" + + submenu 7 + DIALOG "$_PrepMenuTitle " --default-item ${HIGHLIGHT_SUB} \ + --menu "$_PrepMenuBody" 0 0 7 \ + "1" "$_VCKeymapTitle" \ + "2" "$_DevShowOpt" \ + "3" "$_PrepPartDisk" \ + "4" "$_PrepLUKS" \ + "5" "$_PrepLVM $_PrepLVM2" \ + "6" "$_PrepMntPart" \ + "7" "$_Back" 2>${ANSWER} + + HIGHLIGHT_SUB=$(cat ${ANSWER}) + case $(cat ${ANSWER}) in + "1") set_keymap + ;; + "2") show_devices + ;; + "3") umount_partitions + select_device + create_partitions + ;; + "4") luks_menu + ;; + "5") lvm_menu + ;; + "6") mount_partitions + ;; + *) loopmenu=0 + ;; + esac + done + main_menu } # Base Installation install_base_menu() { - local PARENT="$FUNCNAME" - - submenu 5 - DIALOG " $_InstBsMenuTitle " --default-item ${HIGHLIGHT_SUB} --menu "$_InstBseMenuBody" 0 0 5 \ - "1" "$_PrepMirror" \ - "2" "$_PrepPacKey" \ - "3" "$_InstBse" \ - "4" "$_InstBootldr" \ - "5" "$_Back" 2>${ANSWER} - - HIGHLIGHT_SUB=$(cat ${ANSWER}) - case $(cat ${ANSWER}) in - "1") configure_mirrorlist - ;; - "2") clear - pacman-key --init - pacman-key --populate archlinux manjaro - pacman-key --refresh-keys - check_for_error "refresh pacman-keys" - ;; - "3") install_base - ;; - "4") install_bootloader - ;; - *) main_menu_online - ;; - esac - - install_base_menu -} - -install_graphics_menu() { - local PARENT="$FUNCNAME" - - submenu 4 - DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ - --menu "$_InstGrMenuBody" 0 0 4 \ - "1" "$_InstGrMenuDD" \ - "2" "$_InstGrMenuGE|>" \ - "3" "$_PrepKBLayout" \ - "4" "$_Back" 2>${ANSWER} - - HIGHLIGHT_SUB=$(cat ${ANSWER}) - case $(cat ${ANSWER}) in - "1") setup_graphics_card - ;; - "2") install_desktop_menu - ;; - "3") set_xkbmap - ;; - *) main_menu_online - ;; - esac - - install_graphics_menu + declare -i loopmenu=1 + while ((loopmenu)); do + local PARENT="$FUNCNAME" + + submenu 5 + DIALOG " $_InstBsMenuTitle " --default-item ${HIGHLIGHT_SUB} --menu "$_InstBseMenuBody" 0 0 5 \ + "1" "$_PrepMirror" \ + "2" "$_PrepPacKey" \ + "3" "$_InstBse" \ + "4" "$_InstBootldr" \ + "5" "$_Back" 2>${ANSWER} + + HIGHLIGHT_SUB=$(cat ${ANSWER}) + case $(cat ${ANSWER}) in + "1") configure_mirrorlist + ;; + "2") clear + pacman-key --init + pacman-key --populate archlinux manjaro + pacman-key --refresh-keys + check_for_error "refresh pacman-keys" + ;; + "3") install_base + ;; + "4") install_bootloader + ;; + *) loopmenu=0 + ;; + esac + done + main_menu } # Base Configuration config_base_menu() { - local PARENT="$FUNCNAME" - - submenu 8 - DIALOG "$_ConfBseBody" --default-item ${HIGHLIGHT_SUB} --menu " $_ConfBseMenuTitle " \ - 0 0 8 \ - "1" "$_ConfBseFstab" \ - "2" "$_ConfBseHost" \ - "3" "$_ConfBseSysLoc" \ - "4" "$_ConfBseTimeHC" \ - "5" "$_ConfUsrRoot" \ - "6" "$_ConfUsrNew" \ - "7" "$_MMRunMkinit" \ - "8" "$_Back" 2>${ANSWER} - - HIGHLIGHT_SUB=$(cat ${ANSWER}) - case $(cat ${ANSWER}) in - "1") generate_fstab - ;; - "2") set_hostname - ;; - "3") set_locale - ;; - "4") set_timezone - set_hw_clock - ;; - "5") set_root_password - ;; - "6") create_new_user - ;; - "7") run_mkinitcpio - ;; - *) main_menu_online - ;; - esac - - config_base_menu + declare -i loopmenu=1 + while ((loopmenu)); do + local PARENT="$FUNCNAME" + + submenu 8 + DIALOG "$_ConfBseBody" --default-item ${HIGHLIGHT_SUB} --menu " $_ConfBseMenuTitle " \ + 0 0 8 \ + "1" "$_ConfBseFstab" \ + "2" "$_ConfBseHost" \ + "3" "$_ConfBseSysLoc" \ + "4" "$_ConfBseTimeHC" \ + "5" "$_ConfUsrRoot" \ + "6" "$_ConfUsrNew" \ + "7" "$_MMRunMkinit" \ + "8" "$_Back" 2>${ANSWER} + + HIGHLIGHT_SUB=$(cat ${ANSWER}) + case $(cat ${ANSWER}) in + "1") generate_fstab + ;; + "2") set_hostname + ;; + "3") set_locale + ;; + "4") set_timezone + set_hw_clock + ;; + "5") set_root_password + ;; + "6") create_new_user + ;; + "7") run_mkinitcpio + ;; + *) loopmenu=0 + ;; + esac + done + main_menu +} + +install_graphics_menu() { + declare -i loopmenu=1 + while ((loopmenu)); do + local PARENT="$FUNCNAME" + + submenu 4 + DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ + --menu "$_InstGrMenuBody" 0 0 4 \ + "1" "$_InstGrMenuDD" \ + "2" "$_InstGrMenuGE|>" \ + "3" "$_PrepKBLayout" \ + "4" "$_Back" 2>${ANSWER} + + HIGHLIGHT_SUB=$(cat ${ANSWER}) + case $(cat ${ANSWER}) in + "1") setup_graphics_card + ;; + "2") install_desktop_menu + ;; + "3") set_xkbmap + ;; + *) loopmenu=0 + ;; + esac + done + main_menu } install_vanilla_de_wm() { - local PARENT="$FUNCNAME" - - submenu 4 - DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ - --menu "$_InstGrMenuBody" 0 0 4 \ - "1" "$_InstGrMenuDS" \ - "2" "$_InstGrDE" \ - "3" "$_InstGrMenuDM" \ - "4" "$_Back" 2>${ANSWER} - - HIGHLIGHT_SUB=$(cat ${ANSWER}) - case $(cat ${ANSWER}) in - "1") install_xorg_input - ;; - "2") install_de_wm - ;; - "3") install_dm - ;; - *) SUB_MENU="install_graphics_menu" - HIGHLIGHT_SUB=2 - install_graphics_menu - ;; - esac - - install_vanilla_de_wm - + declare -i loopmenu=1 + while ((loopmenu)); do + local PARENT="$FUNCNAME" + + submenu 4 + DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ + --menu "$_InstGrMenuBody" 0 0 4 \ + "1" "$_InstGrMenuDS" \ + "2" "$_InstGrDE" \ + "3" "$_InstGrMenuDM" \ + "4" "$_Back" 2>${ANSWER} + + HIGHLIGHT_SUB=$(cat ${ANSWER}) + case $(cat ${ANSWER}) in + "1") install_xorg_input + ;; + "2") install_de_wm + ;; + "3") install_dm + ;; + *) loopmenu=0 + ;; + esac + done + install_graphics_menu } install_desktop_menu() { - local PARENT="$FUNCNAME" - - submenu 4 - DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ - --menu "$_InstDEMenuTitle" 0 0 4 \ - "1" "$_InstDEStable" \ - "2" "$_InstDEGit" \ - "3" "$_InstDE|>" \ - "4" "$_Back" 2>${ANSWER} - - HIGHLIGHT_SUB=$(cat ${ANSWER}) - case $(cat ${ANSWER}) in - "1") install_manjaro_de_wm_pkg - ;; - "2") install_manjaro_de_wm_git - ;; - "3") install_vanilla_de_wm - ;; - *) SUB_MENU="install_graphics_menu" - HIGHLIGHT_SUB=2 - install_graphics_menu - ;; - esac - - install_desktop_menu + declare -i loopmenu=1 + while ((loopmenu)); do + local PARENT="$FUNCNAME" + + submenu 4 + DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ + --menu "$_InstDEMenuTitle" 0 0 4 \ + "1" "$_InstDEStable" \ + "2" "$_InstDEGit" \ + "3" "$_InstDE|>" \ + "4" "$_Back" 2>${ANSWER} + + HIGHLIGHT_SUB=$(cat ${ANSWER}) + case $(cat ${ANSWER}) in + "1") install_manjaro_de_wm_pkg + ;; + "2") install_manjaro_de_wm_git + ;; + "3") install_vanilla_de_wm + ;; + *) loopmenu=0 + ;; + esac + done + install_graphics_menu } # Install Accessibility Applications @@ -286,86 +295,87 @@ install_acc_menu() { basestrap ${MOUNTPOINT} ${PACKAGES} 2>$ERR check_for_error "$FUNCNAME" $? install_multimedia_menu fi - install_multimedia_menu } edit_configs() { - local PARENT="$FUNCNAME" - - # Clear the file variables - FILE="" - user_list="" - - submenu 13 - DIALOG " $_SeeConfOptTitle " --default-item ${HIGHLIGHT_SUB} --menu "$_SeeConfOptBody" 0 0 13 \ - "1" "/etc/vconsole.conf" \ - "2" "/etc/locale.conf" \ - "3" "/etc/hostname" \ - "4" "/etc/hosts" \ - "5" "/etc/sudoers" \ - "6" "/etc/mkinitcpio.conf" \ - "7" "/etc/fstab" \ - "8" "/etc/crypttab" \ - "9" "grub/syslinux/systemd-boot" \ - "10" "lxdm/lightdm/sddm" \ - "11" "/etc/pacman.conf" \ - "12" "~/.xinitrc" \ - "13" "$_Back" 2>${ANSWER} - - HIGHLIGHT_SUB=$(cat ${ANSWER}) - case $(cat ${ANSWER}) in - "1") [[ -e ${MOUNTPOINT}/etc/vconsole.conf ]] && FILE="${MOUNTPOINT}/etc/vconsole.conf" - ;; - "2") [[ -e ${MOUNTPOINT}/etc/locale.conf ]] && FILE="${MOUNTPOINT}/etc/locale.conf" - ;; - "3") [[ -e ${MOUNTPOINT}/etc/hostname ]] && FILE="${MOUNTPOINT}/etc/hostname" - ;; - "4") [[ -e ${MOUNTPOINT}/etc/hosts ]] && FILE="${MOUNTPOINT}/etc/hosts" - ;; - "5") [[ -e ${MOUNTPOINT}/etc/sudoers ]] && FILE="${MOUNTPOINT}/etc/sudoers" - ;; - "6") [[ -e ${MOUNTPOINT}/etc/mkinitcpio.conf ]] && FILE="${MOUNTPOINT}/etc/mkinitcpio.conf" - ;; - "7") [[ -e ${MOUNTPOINT}/etc/fstab ]] && FILE="${MOUNTPOINT}/etc/fstab" - ;; - "8") [[ -e ${MOUNTPOINT}/etc/crypttab ]] && FILE="${MOUNTPOINT}/etc/crypttab" - ;; - "9") [[ -e ${MOUNTPOINT}/etc/default/grub ]] && FILE="${MOUNTPOINT}/etc/default/grub" - [[ -e ${MOUNTPOINT}/boot/syslinux/syslinux.cfg ]] && FILE="$FILE ${MOUNTPOINT}/boot/syslinux/syslinux.cfg" - if [[ -e ${MOUNTPOINT}${UEFI_MOUNT}/loader/loader.conf ]]; then - files=$(ls ${MOUNTPOINT}${UEFI_MOUNT}/loader/entries/*.conf) - for i in ${files}; do - FILE="$FILE ${i}" + declare -i loopmenu=1 + while ((loopmenu)); do + local PARENT="$FUNCNAME" + + # Clear the file variables + FILE="" + user_list="" + + submenu 13 + DIALOG " $_SeeConfOptTitle " --default-item ${HIGHLIGHT_SUB} --menu "$_SeeConfOptBody" 0 0 13 \ + "1" "/etc/vconsole.conf" \ + "2" "/etc/locale.conf" \ + "3" "/etc/hostname" \ + "4" "/etc/hosts" \ + "5" "/etc/sudoers" \ + "6" "/etc/mkinitcpio.conf" \ + "7" "/etc/fstab" \ + "8" "/etc/crypttab" \ + "9" "grub/syslinux/systemd-boot" \ + "10" "lxdm/lightdm/sddm" \ + "11" "/etc/pacman.conf" \ + "12" "~/.xinitrc" \ + "13" "$_Back" 2>${ANSWER} + + HIGHLIGHT_SUB=$(cat ${ANSWER}) + case $(cat ${ANSWER}) in + "1") [[ -e ${MOUNTPOINT}/etc/vconsole.conf ]] && FILE="${MOUNTPOINT}/etc/vconsole.conf" + ;; + "2") [[ -e ${MOUNTPOINT}/etc/locale.conf ]] && FILE="${MOUNTPOINT}/etc/locale.conf" + ;; + "3") [[ -e ${MOUNTPOINT}/etc/hostname ]] && FILE="${MOUNTPOINT}/etc/hostname" + ;; + "4") [[ -e ${MOUNTPOINT}/etc/hosts ]] && FILE="${MOUNTPOINT}/etc/hosts" + ;; + "5") [[ -e ${MOUNTPOINT}/etc/sudoers ]] && FILE="${MOUNTPOINT}/etc/sudoers" + ;; + "6") [[ -e ${MOUNTPOINT}/etc/mkinitcpio.conf ]] && FILE="${MOUNTPOINT}/etc/mkinitcpio.conf" + ;; + "7") [[ -e ${MOUNTPOINT}/etc/fstab ]] && FILE="${MOUNTPOINT}/etc/fstab" + ;; + "8") [[ -e ${MOUNTPOINT}/etc/crypttab ]] && FILE="${MOUNTPOINT}/etc/crypttab" + ;; + "9") [[ -e ${MOUNTPOINT}/etc/default/grub ]] && FILE="${MOUNTPOINT}/etc/default/grub" + [[ -e ${MOUNTPOINT}/boot/syslinux/syslinux.cfg ]] && FILE="$FILE ${MOUNTPOINT}/boot/syslinux/syslinux.cfg" + if [[ -e ${MOUNTPOINT}${UEFI_MOUNT}/loader/loader.conf ]]; then + files=$(ls ${MOUNTPOINT}${UEFI_MOUNT}/loader/entries/*.conf) + for i in ${files}; do + FILE="$FILE ${i}" + done + fi + ;; + "10") [[ -e ${MOUNTPOINT}/etc/lxdm/lxdm.conf ]] && FILE="${MOUNTPOINT}/etc/lxdm/lxdm.conf" + [[ -e ${MOUNTPOINT}/etc/lightdm/lightdm.conf ]] && FILE="${MOUNTPOINT}/etc/lightdm/lightdm.conf" + [[ -e ${MOUNTPOINT}/etc/sddm.conf ]] && FILE="${MOUNTPOINT}/etc/sddm.conf" + ;; + "11") [[ -e ${MOUNTPOINT}/etc/pacman.conf ]] && FILE="${MOUNTPOINT}/etc/pacman.conf" + ;; + "12") user_list=$(ls ${MOUNTPOINT}/home/ | sed "s/lost+found//") + for i in ${user_list}; do + [[ -e ${MOUNTPOINT}/home/$i/.xinitrc ]] && FILE="$FILE ${MOUNTPOINT}/home/$i/.xinitrc" done + ;; + *) loopmenu=0 + ;; + esac + + if [[ $FILE != "" ]]; then + nano $FILE + if [[ $FILE="${MOUNTPOINT}/etc/mkinitcpio.conf" ]]; then + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "${_MMRunMkinit}?" 0 0 && { + run_mkinitcpio 2>$ERR + check_for_error "run_mkinitcpio" "$?" edit_configs + } fi - ;; - "10") [[ -e ${MOUNTPOINT}/etc/lxdm/lxdm.conf ]] && FILE="${MOUNTPOINT}/etc/lxdm/lxdm.conf" - [[ -e ${MOUNTPOINT}/etc/lightdm/lightdm.conf ]] && FILE="${MOUNTPOINT}/etc/lightdm/lightdm.conf" - [[ -e ${MOUNTPOINT}/etc/sddm.conf ]] && FILE="${MOUNTPOINT}/etc/sddm.conf" - ;; - "11") [[ -e ${MOUNTPOINT}/etc/pacman.conf ]] && FILE="${MOUNTPOINT}/etc/pacman.conf" - ;; - "12") user_list=$(ls ${MOUNTPOINT}/home/ | sed "s/lost+found//") - for i in ${user_list}; do - [[ -e ${MOUNTPOINT}/home/$i/.xinitrc ]] && FILE="$FILE ${MOUNTPOINT}/home/$i/.xinitrc" - done - ;; - *) main_menu_online - ;; - esac - - if [[ $FILE != "" ]]; then - nano $FILE - if [[ $FILE="${MOUNTPOINT}/etc/mkinitcpio.conf" ]]; then - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "${_MMRunMkinit}?" 0 0 && { - run_mkinitcpio 2>$ERR - check_for_error "run_mkinitcpio" "$?" edit_configs - } + else + DIALOG " $_ErrTitle " --msgbox "$_SeeConfErrBody" 0 0 fi - else - DIALOG " $_ErrTitle " --msgbox "$_SeeConfErrBody" 0 0 - fi - - edit_configs + done + main_menu } diff --git a/lib/util.sh b/lib/util.sh index 74c99d5..3ecc3bb 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -106,7 +106,8 @@ submenu() { if [[ $SUB_MENU != "$PARENT" ]]; then SUB_MENU="$PARENT" HIGHLIGHT_SUB=1 - elif [[ $HIGHLIGHT_SUB != "$1" ]]; then + fi + if [[ $HIGHLIGHT_SUB != "$1" ]]; then HIGHLIGHT_SUB=$(( HIGHLIGHT_SUB + 1 )) fi } @@ -157,7 +158,7 @@ id_system() { check_for_error() { local _msg="$1" local _err="${2:-0}" - local _function_menu="${3:-main_menu_online}" + local _function_menu="${3:-main_menu}" ((${_err}!=0)) && _msg="[${_msg}][${_err}]" [[ -f "${ERR}" ]] && { _msg="${_msg} $(head -n1 ${ERR})" @@ -169,8 +170,9 @@ check_for_error() { _fpath=" --${_fpath// /()<-}" echo -e "$(date +%D\ %T) ERROR ${_msg} ${_fpath}" >> "${LOGFILE}" if [[ "${_function_menu}" != "SKIP" ]]; then - DIALOG " $_ErrTitle " --msgbox "\n${_msg}\n" 0 0 - ($_function_menu) + DIALOG " $_ErrTitle " --msgbox "\n${_msg}\n" 0 0 + loopmenu=0 # ?? + ($_function_menu) fi else echo -e "$(date +%D\ %T) ${_msg}" >> "${LOGFILE}" @@ -291,7 +293,8 @@ check_requirements() { sleep 2 clear echo "" > $ERR - pacman -Syy + pacman -Syy 2>$ERR + check_for_error "refresh database" $? 'SKIP' } # Greet the user when first starting the installer @@ -299,6 +302,35 @@ greeting() { DIALOG " $_WelTitle $VERSION " --msgbox "$_WelBody" 0 0 } +# Originally adapted from AIS. Added option to allow users to edit the mirrorlist. +configure_mirrorlist() { + declare -i loopmenu=1 + while ((loopmenu)); do + DIALOG " $_MirrorlistTitle " \ + --menu "$_MirrorlistBody" 0 0 4 \ + "1" "$_MirrorRankTitle" \ + "2" "$_MirrorConfig" \ + "3" "$_MirrorPacman" \ + "4" "$_Back" 2>${ANSWER} + + case $(cat ${ANSWER}) in + "1") rank_mirrors + ;; + "2") nano /etc/pacman-mirrors.conf + check_for_error "edit pacman-mirrors.conf" + ;; + "3") nano /etc/pacman.conf + DIALOG " $_MirrorPacman " --yesno "$_MIrrorPacQ" 0 0 && COPY_PACCONF=1 || COPY_PACCONF=0 + check_for_error "edit pacman.conf $COPY_PACCONF" + pacman -Syy + ;; + *) loopmenu=0 + ;; + esac + done + install_base_menu +} + rank_mirrors() { #Choose the branch for mirrorlist BRANCH="/tmp/.branch" @@ -313,33 +345,6 @@ rank_mirrors() { } } -# Originally adapted from AIS. Added option to allow users to edit the mirrorlist. -configure_mirrorlist() { - DIALOG " $_MirrorlistTitle " \ - --menu "$_MirrorlistBody" 0 0 4 \ - "1" "$_MirrorRankTitle" \ - "2" "$_MirrorConfig" \ - "3" "$_MirrorPacman" \ - "4" "$_Back" 2>${ANSWER} - - case $(cat ${ANSWER}) in - "1") rank_mirrors - ;; - "2") nano /etc/pacman-mirrors.conf - check_for_error "edit pacman-mirrors.conf" - ;; - "3") nano /etc/pacman.conf - DIALOG " $_MirrorPacman " --yesno "$_MIrrorPacQ" 0 0 && COPY_PACCONF=1 || COPY_PACCONF=0 - check_for_error "edit pacman.conf $COPY_PACCONF" - pacman -Syy - ;; - *) install_base_menu - ;; - esac - - configure_mirrorlist -} - # Simple code to show devices / partitions. show_devices() { lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE,MOUNTPOINT | grep "disk\|part\|lvm\|crypt\|NAME\|MODEL\|TYPE\|FSTYPE\|SIZE\|MOUNTPOINT" > /tmp/.devlist @@ -355,7 +360,6 @@ arch_chroot() { check_mount() { if [[ $(lsblk -o MOUNTPOINT | grep ${MOUNTPOINT}) == "" ]]; then DIALOG " $_ErrTitle " --msgbox "$_ErrNoMount" 0 0 - main_menu_online fi } @@ -363,7 +367,6 @@ check_mount() { check_base() { if [[ ! -e /mnt/.base_installed ]]; then DIALOG " $_ErrTitle " --msgbox "$_ErrNoBase" 0 0 - install_base_menu fi }