diff --git a/manjaro-architect b/manjaro-architect index 4fb8ae7..688b083 100644 --- a/manjaro-architect +++ b/manjaro-architect @@ -1865,70 +1865,68 @@ install_network_menu() { install_cups() { - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstNMMenuCups " --checklist "$_InstCupsBody\n\n$_UseSpaceBar" 0 0 5 \ - "cups" "-" on \ - "cups-pdf" "-" off \ - "ghostscript" "-" on \ - "gsfonts" "-" on \ - "samba" "-" off 2>${PACKAGES} + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstNMMenuCups " --checklist "$_InstCupsBody\n\n$_UseSpaceBar" 0 0 5 \ + "cups" "-" on \ + "cups-pdf" "-" off \ + "ghostscript" "-" on \ + "gsfonts" "-" on \ + "samba" "-" off 2>${PACKAGES} - if [[ $(cat ${PACKAGES}) != "" ]]; then - clear - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog - check_for_error + if [[ $(cat ${PACKAGES}) != "" ]]; then + clear + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog + check_for_error if [[ $(cat ${PACKAGES} | grep "cups") != "" ]]; then - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstNMMenuCups " --yesno "$_InstCupsQ" 0 0 - if [[ $? -eq 0 ]]; then - # Add openrc support. If openrcbase was installed, the file /tmp/.openrc should exist. - if [[ -e /tmp/.openrc ]]; then - #statements - arch_chroot "rc-update add cupsd default" 2>/tmp/.errlog - else - arch_chroot "systemctl enable org.cups.cupsd.service" 2>/tmp/.errlog + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstNMMenuCups " --yesno "$_InstCupsQ" 0 0 + if [[ $? -eq 0 ]]; then + # Add openrc support. If openrcbase was installed, the file /tmp/.openrc should exist. + if [[ -e /tmp/.openrc ]]; then + #statements + arch_chroot "rc-update add cupsd default" 2>/tmp/.errlog + else + arch_chroot "systemctl enable org.cups.cupsd.service" 2>/tmp/.errlog + fi + check_for_error + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstNMMenuCups " --infobox "\n$_Done!\n\n" 0 0 + sleep 2 fi - check_for_error - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstNMMenuCups " --infobox "\n$_Done!\n\n" 0 0 - sleep 2 - fi fi - fi +fi } - if [[ $SUB_MENU != "install_network_packages" ]]; then - SUB_MENU="install_network_packages" - HIGHLIGHT_SUB=1 - else - if [[ $HIGHLIGHT_SUB != 5 ]]; then + if [[ $SUB_MENU != "install_network_packages" ]]; then + SUB_MENU="install_network_packages" + HIGHLIGHT_SUB=1 + elif [[ $HIGHLIGHT_SUB != 5 ]]; then HIGHLIGHT_SUB=$(( HIGHLIGHT_SUB + 1 )) - fi - fi + fi dialog --default-item ${HIGHLIGHT_SUB} --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstNMMenuTitle " --menu "$_InstNMMenuBody" 0 0 5 \ - "1" "$_SeeWirelessDev" \ - "2" "$_InstNMMenuPkg" \ - "3" "$_InstNMMenuNM" \ - "4" "$_InstNMMenuCups" \ - "5" "$_Back" 2>${ANSWER} + "1" "$_SeeWirelessDev" \ + "2" "$_InstNMMenuPkg" \ + "3" "$_InstNMMenuNM" \ + "4" "$_InstNMMenuCups" \ + "5" "$_Back" 2>${ANSWER} case $(cat ${ANSWER}) in - "1") # Identify the Wireless Device - lspci -k | grep -i -A 2 "network controller" > /tmp/.wireless - if [[ $(cat /tmp/.wireless) != "" ]]; then - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_WirelessShowTitle " --textbox /tmp/.wireless 0 0 - else - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_WirelessShowTitle " --msgbox "$_WirelessErrBody" 7 30 - fi - ;; - "2") install_wireless_packages - ;; - "3") install_nm - ;; - "4") install_cups - ;; - *) main_menu_online - ;; + "1") # Identify the Wireless Device + lspci -k | grep -i -A 2 "network controller" > /tmp/.wireless + if [[ $(cat /tmp/.wireless) != "" ]]; then + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_WirelessShowTitle " --textbox /tmp/.wireless 0 0 + else + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_WirelessShowTitle " --msgbox "$_WirelessErrBody" 7 30 + fi + ;; + "2") install_wireless_packages + ;; + "3") install_nm + ;; + "4") install_cups + ;; + *) main_menu_online + ;; esac install_network_menu @@ -1938,38 +1936,39 @@ install_cups() { # Install xorg and input drivers. Also copy the xkbmap configuration file created earlier to the installed system install_xorg_input() { - echo "" > ${PACKAGES} + echo "" > ${PACKAGES} - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstGrMenuDS " --checklist "$_InstGrMenuDSBody\n\n$_UseSpaceBar" 0 0 11 \ - "wayland" "-" off \ - "xorg-server" "-" on \ - "xorg-server-common" "-" off \ - "xorg-server-utils" "-" on \ - "xorg-xinit" "-" on \ - "xorg-server-xwayland" "-" off \ - "xf86-input-evdev" "-" off \ - "xf86-input-keyboard" "-" on \ - "xf86-input-libinput" "-" on \ - "xf86-input-mouse" "-" on \ - "xf86-input-synaptics" "-" off 2>${PACKAGES} + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstGrMenuDS " --checklist "$_InstGrMenuDSBody\n\n$_UseSpaceBar" 0 0 11 \ + "wayland" "-" off \ + "xorg-server" "-" on \ + "xorg-server-common" "-" off \ + "xorg-server-utils" "-" on \ + "xorg-xinit" "-" on \ + "xorg-server-xwayland" "-" off \ + "xf86-input-evdev" "-" off \ + "xf86-input-keyboard" "-" on \ + "xf86-input-libinput" "-" on \ + "xf86-input-mouse" "-" on \ + "xf86-input-synaptics" "-" off 2>${PACKAGES} - clear - # If at least one package, install. - if [[ $(cat ${PACKAGES}) != "" ]]; then - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog - check_for_error - fi + clear + # If at least one package, install. + if [[ $(cat ${PACKAGES}) != "" ]]; then + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog + check_for_error + fi - # now copy across .xinitrc for all user accounts - user_list=$(ls ${MOUNTPOINT}/home/ | sed "s/lost+found//") - for i in ${user_list}; do - [[ -e ${MOUNTPOINT}/home/$i/.xinitrc ]] || cp -f ${MOUNTPOINT}/etc/X11/xinit/xinitrc ${MOUNTPOINT}/home/$i/.xinitrc - arch_chroot "chown -R ${i}:${i} /home/${i}" - done + # now copy across .xinitrc for all user accounts + user_list=$(ls ${MOUNTPOINT}/home/ | sed "s/lost+found//") + for i in ${user_list}; do + [[ -e ${MOUNTPOINT}/home/$i/.xinitrc ]] || cp -f ${MOUNTPOINT}/etc/X11/xinit/xinitrc ${MOUNTPOINT}/home/$i/.xinitrc + arch_chroot "chown -R ${i}:${i} /home/${i}" + done + + SUB_MENU="install_vanilla_de_wm" + HIGHLIGHT_SUB=1 + install_vanilla_de_wm - SUB_MENU="install_vanilla_de_wm" - HIGHLIGHT_SUB=1 - install_vanilla_de_wm } setup_graphics_card() { @@ -2023,437 +2022,447 @@ setup_graphics_card() { install_de_wm() { - # Only show this information box once - if [[ $SHOW_ONCE -eq 0 ]]; then - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstDETitle " --msgbox "$_DEInfoBody" 0 0 - SHOW_ONCE=1 - fi - - # DE/WM Menu - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstDETitle " --checklist "$_InstDEBody $_UseSpaceBar" 0 0 12 \ - "budgie-desktop" "-" off \ - "cinnamon" "-" off \ - "deepin" "-" off \ - "deepin-extra" "-" off \ - "enlightenment + terminology" "-" off \ - "gnome-shell" "-" off \ - "gnome" "-" off \ - "gnome-extra" "-" off \ - "plasma-desktop" "-" off \ - "plasma" "-" off \ - "kde-applications" "-" off \ - "lxde" "-" off \ - "lxqt + oxygen-icons" "-" off \ - "mate" "-" off \ - "mate-extra" "-" off \ - "mate-gtk3" "-" off \ - "mate-extra-gtk3" "-" off \ - "xfce4" "-" off \ - "xfce4-goodies" "-" off \ - "awesome + vicious" "-" off \ - "fluxbox + fbnews" "-" off \ - "i3-wm + i3lock + i3status" "-" off \ - "icewm + icewm-themes" "-" off \ - "openbox + openbox-themes" "-" off \ - "pekwm + pekwm-themes" "-" off \ - "windowmaker" "-" off 2>${PACKAGES} - - # If something has been selected, install - if [[ $(cat ${PACKAGES}) != "" ]]; then - clear - sed -i 's/+\|\"//g' ${PACKAGES} - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog - check_for_error - - - # Clear the packages file for installation of "common" packages - echo "" > ${PACKAGES} - - # Offer to install various "common" packages. - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstComTitle " --checklist "$_InstComBody $_UseSpaceBar" 0 50 14 \ - "bash-completion" "-" on \ - "gamin" "-" on \ - "gksu" "-" on \ - "gnome-icon-theme" "-" on \ - "gnome-keyring" "-" on \ - "gvfs" "-" on \ - "gvfs-afc" "-" on \ - "gvfs-smb" "-" on \ - "polkit" "-" on \ - "poppler" "-" on \ - "python2-xdg" "-" on \ - "ntfs-3g" "-" on \ - "ttf-dejavu" "-" on \ - "xdg-user-dirs" "-" on \ - "xdg-utils" "-" on \ - "xterm" "-" on 2>${PACKAGES} - - # If at least one package, install. - if [[ $(cat ${PACKAGES}) != "" ]]; then - clear - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog - check_for_error + # Only show this information box once + if [[ $SHOW_ONCE -eq 0 ]]; then + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstDETitle " --msgbox "$_DEInfoBody" 0 0 + SHOW_ONCE=1 fi - fi + # DE/WM Menu + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstDETitle " --checklist "$_InstDEBody $_UseSpaceBar" 0 0 12 \ + "budgie-desktop" "-" off \ + "cinnamon" "-" off \ + "deepin" "-" off \ + "deepin-extra" "-" off \ + "enlightenment + terminology" "-" off \ + "gnome-shell" "-" off \ + "gnome" "-" off \ + "gnome-extra" "-" off \ + "plasma-desktop" "-" off \ + "plasma" "-" off \ + "kde-applications" "-" off \ + "lxde" "-" off \ + "lxqt + oxygen-icons" "-" off \ + "mate" "-" off \ + "mate-extra" "-" off \ + "mate-gtk3" "-" off \ + "mate-extra-gtk3" "-" off \ + "xfce4" "-" off \ + "xfce4-goodies" "-" off \ + "awesome + vicious" "-" off \ + "fluxbox + fbnews" "-" off \ + "i3-wm + i3lock + i3status" "-" off \ + "icewm + icewm-themes" "-" off \ + "openbox + openbox-themes" "-" off \ + "pekwm + pekwm-themes" "-" off \ + "windowmaker" "-" off 2>${PACKAGES} + + # If something has been selected, install + if [[ $(cat ${PACKAGES}) != "" ]]; then + clear + sed -i 's/+\|\"//g' ${PACKAGES} + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog + check_for_error + + # Clear the packages file for installation of "common" packages + echo "" > ${PACKAGES} + + # Offer to install various "common" packages. + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstComTitle " --checklist "$_InstComBody $_UseSpaceBar" 0 50 14 \ + "bash-completion" "-" on \ + "gamin" "-" on \ + "gksu" "-" on \ + "gnome-icon-theme" "-" on \ + "gnome-keyring" "-" on \ + "gvfs" "-" on \ + "gvfs-afc" "-" on \ + "gvfs-smb" "-" on \ + "polkit" "-" on \ + "poppler" "-" on \ + "python2-xdg" "-" on \ + "ntfs-3g" "-" on \ + "ttf-dejavu" "-" on \ + "xdg-user-dirs" "-" on \ + "xdg-utils" "-" on \ + "xterm" "-" on 2>${PACKAGES} + + # If at least one package, install. + if [[ $(cat ${PACKAGES}) != "" ]]; then + clear + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog + check_for_error + fi + fi } install_manjaro_de_wm() { - # Clear packages after installing base - echo "" > /tmp/.desktop - # DE/WM Menu - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstDETitle " --radiolist "$_InstDEBody $_UseSpaceBar" 0 0 12 \ - $(echo $PROFILES/{manjaro,community}/* | xargs -n1 | cut -f7 -d/ | grep -v "netinstall" |awk '$0=$0" - off"') 2> /tmp/.desktop - # If something has been selected, install - if [[ $(cat /tmp/.desktop) != "" ]]; then - # Source the iso-profile - profile=$(echo $PROFILES/*/$(cat /tmp/.desktop)/profile.conf) - . $profile - overlay=$(echo $PROFILES/*/$(cat /tmp/.desktop)/desktop-overlay/) - echo $displaymanager > /tmp/.display-manager - target_desktop=$(echo $PROFILES/*/$(cat /tmp/.desktop)/Packages-Desktop) - # Parse package list based on user input and remove parts that don't belong to pacman - cat $PROFILES/shared/Packages-Root "$target_desktop" > /tmp/.edition - if [[ -e /tmp/.openrc ]]; then - # Remove any packages tagged with >systemd and remove >openrc tags - sed -i '/>systemd/d' /tmp/.edition - sed -i 's/>openrc //g' /tmp/.edition - else - # Remove any packages tagged with >openrc and remove >systemd tags - sed -i '/>openrc/d' /tmp/.edition - sed -i 's/>systemd //g' /tmp/.edition - fi + # Clear packages after installing base + echo "" > /tmp/.desktop - if [[ "$(uname -m)" == "x86_64" ]]; then - # Remove any packages tagged with >i686 and remove >x86_64 tags - sed -i '/>i686/d' /tmp/.edition - sed -i '/>nonfree_i686/d' /tmp/.edition - sed -i 's/>x86_64 //g' /tmp/.edition - else - # Remove any packages tagged with >x86_64 and remove >i686 tags - sed -i '/>x86_64/d' /tmp/.edition - sed -i '/>nonfree_x86_64/d' /tmp/.edition - sed -i 's/>i686 //g' /tmp/.edition - fi - # If multilib repo is enabled, install multilib packages - if grep -q "^[multilib]" ${MOUNTPOINT}/etc/pacman.conf ; then - # Remove >multilib tags - sed -i 's/>multilib //g' /tmp/.edition - sed -i 's/>nonfree_multilib //g' /tmp/.edition - else - # Remove lines with >multilib tag - sed -i '/>multilib/d' /tmp/.edition - sed -i '/>nonfree_multilib/d' /tmp/.edition - fi - if grep -q ">extra" /tmp/.edition;then - # User to select initsystem - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " Full or minimal? " --menu "This edition is offered in two versions" 0 0 2 \ - "1" "full" \ - "2" "minimal" 2>/tmp/.version + # DE/WM Menu + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstDETitle " --radiolist "$_InstDEBody $_UseSpaceBar" 0 0 12 \ + $(echo $PROFILES/{manjaro,community}/* | xargs -n1 | cut -f7 -d/ | grep -v "netinstall" |awk '$0=$0" - off"') 2> /tmp/.desktop + + # If something has been selected, install + if [[ $(cat /tmp/.desktop) != "" ]]; then + + # Source the iso-profile + profile=$(echo $PROFILES/*/$(cat /tmp/.desktop)/profile.conf) + . $profile + overlay=$(echo $PROFILES/*/$(cat /tmp/.desktop)/desktop-overlay/) + echo $displaymanager > /tmp/.display-manager + target_desktop=$(echo $PROFILES/*/$(cat /tmp/.desktop)/Packages-Desktop) + + # Parse package list based on user input and remove parts that don't belong to pacman + cat $PROFILES/shared/Packages-Root "$target_desktop" > /tmp/.edition + if [[ -e /tmp/.openrc ]]; then + # Remove any packages tagged with >systemd and remove >openrc tags + sed -i '/>systemd/d' /tmp/.edition + sed -i 's/>openrc //g' /tmp/.edition + else + # Remove any packages tagged with >openrc and remove >systemd tags + sed -i '/>openrc/d' /tmp/.edition + sed -i 's/>systemd //g' /tmp/.edition + fi + + if [[ "$(uname -m)" == "x86_64" ]]; then + # Remove any packages tagged with >i686 and remove >x86_64 tags + sed -i '/>i686/d' /tmp/.edition + sed -i '/>nonfree_i686/d' /tmp/.edition + sed -i 's/>x86_64 //g' /tmp/.edition + else + # Remove any packages tagged with >x86_64 and remove >i686 tags + sed -i '/>x86_64/d' /tmp/.edition + sed -i '/>nonfree_x86_64/d' /tmp/.edition + sed -i 's/>i686 //g' /tmp/.edition + fi + + # If multilib repo is enabled, install multilib packages + if grep -q "^[multilib]" ${MOUNTPOINT}/etc/pacman.conf ; then + # Remove >multilib tags + sed -i 's/>multilib //g' /tmp/.edition + sed -i 's/>nonfree_multilib //g' /tmp/.edition + else + # Remove lines with >multilib tag + sed -i '/>multilib/d' /tmp/.edition + sed -i '/>nonfree_multilib/d' /tmp/.edition + fi + + if grep -q ">extra" /tmp/.edition;then + # User to select base|extra profile + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title "$_ExtraTitle" --menu "$_ExtraBody" 0 0 2 \ + "1" "full" \ + "2" "minimal" 2>/tmp/.version if [[ $(cat /tmp/.version) -eq 2 ]]; then - touch /tmp/.minimal - else - [[ -e /tmp/.minimal ]] && rm /tmp/.minimal - fi + touch /tmp/.minimal + else + [[ -e /tmp/.minimal ]] && rm /tmp/.minimal + fi fi + if [[ -e /tmp/.minimal ]]; then - # Remove >extra tags - sed -i 's/>basic //g' /tmp/.edition - sed -i '/>extra/d' /tmp/.edition + # Remove >extra tags + sed -i 's/>basic //g' /tmp/.edition + sed -i '/>extra/d' /tmp/.edition else - # Remove >basic tags - sed -i 's/>extra //g' /tmp/.edition - sed -i '/>basic/d' /tmp/.edition + # Remove >basic tags + sed -i 's/>extra //g' /tmp/.edition + sed -i '/>basic/d' /tmp/.edition fi - # Remove commented lines - # remove everything except the first word of every lines - sed -i 's/\s.*$//' /tmp/.edition - # Remove lines with # - sed -i '/#/d' /tmp/.edition - # remove KERNEL variable - sed -i '/KERNEL/d' /tmp/.edition - # Remove empty lines - sed -i '/^\s*$/d' /tmp/.edition - # Remove base-devel and base packages. Base is already installed and base-devel should be decided by the user - #pacman -Sgq base-devel base openrc-base > /tmp/.notincluded - #grep -v -f /tmp/.notincluded /tmp/.edition | grep -v "base-devel" > /tmp/.tmp - #mv /tmp/.tmp /tmp/.edition - # Remove packages that have been dropped from repos - pacman -Ssq > /tmp/.available_packages - grep -f /tmp/.available_packages /tmp/.edition > /tmp/.tmp - mv /tmp/.tmp /tmp/.edition - # remove zsh - sed -i '/^zsh$/d' /tmp/.edition - # basestrap the parsed package list to the new root - basestrap -i ${MOUNTPOINT} $(cat /tmp/.edition /usr/share/aif/package-lists/input-drivers | sort | uniq) + # Remove commented lines + # remove everything except the first word of every lines + sed -i 's/\s.*$//' /tmp/.edition + # Remove lines with # + sed -i '/#/d' /tmp/.edition + # remove KERNEL variable + sed -i '/KERNEL/d' /tmp/.edition + # Remove empty lines + sed -i '/^\s*$/d' /tmp/.edition - # copy the profile overlay to the new root - echo "Copying overlay files to the new root" - cp -r "$overlay"* ${MOUNTPOINT} 2>/tmp/.errlog - check_for_error - # Enable services in the chosen profile - echo "Enabling services" - if [[ -e /tmp/.openrc ]]; then - eval $(grep -e "enable_openrc=" $profile | sed 's/# //g') - echo "${enable_openrc[@]}" > /tmp/.services - echo /mnt/etc/init.d/* | xargs -n1 | cut -d/ -f5 > /tmp/.available_services - grep -f /tmp/.available_services /tmp/.services > /tmp/.fix && mv /tmp/.fix /tmp/.services - for service in "$(cat /tmp/.services)" ; do - arch_chroot "rc-update add $service default" - done - # enable display manager for openrc - if [[ "$(cat /tmp/.display-manager)" == sddm ]]; then - sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"sddm\"/g" /mnt/etc/conf.d/xdm - arch_chroot "rc-update add xdm default || true" 2>/tmp/.errlog + # Remove base-devel and base packages. Base is already installed and base-devel should be decided by the user + # pacman -Sgq base-devel base openrc-base > /tmp/.notincluded + # grep -v -f /tmp/.notincluded /tmp/.edition | grep -v "base-devel" > /tmp/.tmp + # mv /tmp/.tmp /tmp/.edition + # Remove packages that have been dropped from repos + pacman -Ssq > /tmp/.available_packages + grep -f /tmp/.available_packages /tmp/.edition > /tmp/.tmp + mv /tmp/.tmp /tmp/.edition + # remove zsh + sed -i '/^zsh$/d' /tmp/.edition + # basestrap the parsed package list to the new root + basestrap -i ${MOUNTPOINT} $(cat /tmp/.edition /usr/share/aif/package-lists/input-drivers | sort | uniq) + + # copy the profile overlay to the new root + echo "Copying overlay files to the new root" + cp -r "$overlay"* ${MOUNTPOINT} 2>/tmp/.errlog + check_for_error + + # Enable services in the chosen profile + echo "Enabling services" + if [[ -e /tmp/.openrc ]]; then + eval $(grep -e "enable_openrc=" $profile | sed 's/# //g') + echo "${enable_openrc[@]}" > /tmp/.services + echo /mnt/etc/init.d/* | xargs -n1 | cut -d/ -f5 > /tmp/.available_services + grep -f /tmp/.available_services /tmp/.services > /tmp/.fix && mv /tmp/.fix /tmp/.services + for service in "$(cat /tmp/.services)" ; do + arch_chroot "rc-update add $service default" + done + + # enable display manager for openrc + if [[ "$(cat /tmp/.display-manager)" == sddm ]]; then + sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"sddm\"/g" /mnt/etc/conf.d/xdm + arch_chroot "rc-update add xdm default || true" 2>/tmp/.errlog + check_for_error + set_sddm_ck + elif [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then + set_lightdm_greeter + sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"lightdm\"/g" /mnt/etc/conf.d/xdm + arch_chroot "rc-update add xdm default" 2>/tmp/.errlog + check_for_error + else + echo "no display manager was installed" + sleep 2 + fi + else + eval $(grep -e "enable_systemd=" $profile | sed 's/# //g') + echo "${enable_systemd[@]}" | xargs -n1 > /tmp/.services + echo /mnt/usr/lib/systemd/system/* | xargs -n1 | cut -d/ -f7 | sed 's/.service//g' > /tmp/.available_services + grep -f /tmp/.available_services /tmp/.services > /tmp/.fix && mv /tmp/.fix /tmp/.services + arch_chroot "systemctl enable $(cat /tmp/.services)" + arch_chroot "systemctl disable pacman-init" + # enable display manager for systemd + if [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then + set_lightdm_greeter + arch_chroot "systemctl enable lightdm" 2>/tmp/.errlog + check_for_error + elif [[ "$(cat /tmp/.display-manager)" == sddm ]]; then + arch_chroot "systemctl enable sddm" 2>/tmp/.errlog + check_for_error + elif [[ "$(cat /tmp/.display-manager)" == gdm ]]; then + arch_chroot "systemctl enable gdm" 2>/tmp/.errlog + check_for_error + else + echo "no display manager was installed" + sleep 2 + fi + fi + + # Stop for a moment so user can see if there were errors + echo "press Enter to continue" + read + # Clear the packages file for installation of "common" packages + echo "" + echo "" + echo "" + echo "" > ${PACKAGES} + + # Offer to install various "common" packages. + + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstComTitle " --checklist "$_InstComBody $_UseSpaceBar" 0 50 13 \ + "manjaro-settings-manager" "-" off \ + "pamac" "-" off \ + "octopi" "-" off \ + "pacli" "-" off \ + "pacui" "-" off \ + "fish" "-" off \ + "fisherman" "-" off \ + "zsh" "-" on \ + "zsh-completions" "-" on \ + "grml-zsh-config" "-" on \ + "mhwd-chroot" "-" off \ + "bmenu" "-" on \ + "clonezilla" "-" off \ + "snapper" "-" off \ + "snap-pac" "-" off \ + "manjaro-tools-iso" "-" off \ + "manjaro-tools-base" "-" off \ + "manjaro-tools-pkg" "-" off 2>${PACKAGES} + + # If at least one package, install. + if [[ $(cat ${PACKAGES}) != "" ]]; then + clear + basestrap -i ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog check_for_error - set_sddm_ck - elif [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then - set_lightdm_greeter - sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"lightdm\"/g" /mnt/etc/conf.d/xdm - arch_chroot "rc-update add xdm default" 2>/tmp/.errlog - check_for_error - else - echo "no display manager was installed" - sleep 2 - fi - else - eval $(grep -e "enable_systemd=" $profile | sed 's/# //g') - echo "${enable_systemd[@]}" | xargs -n1 > /tmp/.services - echo /mnt/usr/lib/systemd/system/* | xargs -n1 | cut -d/ -f7 | sed 's/.service//g' > /tmp/.available_services - grep -f /tmp/.available_services /tmp/.services > /tmp/.fix && mv /tmp/.fix /tmp/.services - arch_chroot "systemctl enable $(cat /tmp/.services)" - arch_chroot "systemctl disable pacman-init" - # enable display manager for systemd - if [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then - set_lightdm_greeter - arch_chroot "systemctl enable lightdm" 2>/tmp/.errlog - check_for_error - elif [[ "$(cat /tmp/.display-manager)" == sddm ]]; then - arch_chroot "systemctl enable sddm" 2>/tmp/.errlog - check_for_error - elif [[ "$(cat /tmp/.display-manager)" == gdm ]]; then - arch_chroot "systemctl enable gdm" 2>/tmp/.errlog - check_for_error - else - echo "no display manager was installed" - sleep 2 - fi + fi fi - # Stop for a moment so user can see if there were errors - echo "press Enter to continue" - read - # Clear the packages file for installation of "common" packages - echo "" - echo "" - echo "" - echo "" > ${PACKAGES} - - # Offer to install various "common" packages. - - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstComTitle " --checklist "$_InstComBody $_UseSpaceBar" 0 50 13 \ - "manjaro-settings-manager" "-" off \ - "pamac" "-" off \ - "octopi" "-" off \ - "pacli" "-" off \ - "pacui" "-" off \ - "fish" "-" off \ - "fisherman" "-" off \ - "zsh" "-" on \ - "zsh-completions" "-" on \ - "grml-zsh-config" "-" on \ - "mhwd-chroot" "-" off \ - "bmenu" "-" on \ - "clonezilla" "-" off \ - "snapper" "-" off \ - "snap-pac" "-" off \ - "manjaro-tools-iso" "-" off \ - "manjaro-tools-base" "-" off \ - "manjaro-tools-pkg" "-" off 2>${PACKAGES} - - # If at least one package, install. - if [[ $(cat ${PACKAGES}) != "" ]]; then - clear - basestrap -i ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog - check_for_error - fi - - fi } inst_needed() { + [[ ! $(pacman -Q $1 2>/dev/null) ]] && pacman -Sy --noconfirm $1 + } install_manjaro_de_wm_pkg() { + PROFILES="/usr/share/manjaro-tools/iso-profiles" # Only show this information box once if [[ $SHOW_ONCE -eq 0 ]]; then - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstDETitle " --msgbox "This installs a package list and a desktop-settings package that correspond to manjaro editions of the same name." 0 0 - SHOW_ONCE=1 + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstDETitle " --msgbox "$_InstPBody" 0 0 + SHOW_ONCE=1 fi # install iso-profiles pkgs as needed local pkgs=(manjaro-iso-profiles-{base,official,community}) for p in ${pkgs[@]}; do - inst_needed $p + inst_needed $p done install_manjaro_de_wm + } install_manjaro_de_wm_git() { + PROFILES="/usr/share/aif/profiles" # Only show this information box once if [[ $SHOW_ONCE -eq 0 ]]; then - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstDETitle " --msgbox "This installs a package list and a desktop-settings package that correspond to manjaro editions of the same name." 0 0 - SHOW_ONCE=1 + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstDETitle " --msgbox "$_InstPBody" 0 0 + SHOW_ONCE=1 fi - # install git if not yet installed + # install git if not already installed inst_needed git # download manjaro-tools.-isoprofiles git repo if [[ -f $PROFILES ]]; then - git -C $PROFILES pull + git -C $PROFILES pull else - git clone --depth 1 https://github.com/manjaro/iso-profiles.git $PROFILES + git clone --depth 1 https://github.com/manjaro/iso-profiles.git $PROFILES fi install_manjaro_de_wm + } # Display Manager install_dm() { -# Save repetition of code -enable_dm() { - if [[ -e /tmp/.openrc ]]; then - sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"$(cat ${PACKAGES})\"/g" /mnt/etc/conf.d/xdm - arch_chroot "rc-update add xdm default" 2>/tmp/.errlog - check_for_error - DM=$(cat ${PACKAGES}) - DM_ENABLED=1 - else - # enable display manager for systemd - arch_chroot "systemctl enable $(cat ${PACKAGES})" 2>/tmp/.errlog - check_for_error - DM=$(cat ${PACKAGES}) - DM_ENABLED=1 - fi -} - - if [[ $DM_ENABLED -eq 0 ]]; then - # Prep variables - echo "" > ${PACKAGES} - dm_list="gdm lxdm lightdm sddm" - DM_LIST="" - DM_INST="" - - # Generate list of DMs installed with DEs, and a list for selection menu - for i in ${dm_list}; do - [[ -e ${MOUNTPOINT}/usr/bin/${i} ]] && DM_INST="${DM_INST} ${i}" - DM_LIST="${DM_LIST} ${i} -" - done - - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_DmChTitle " --menu "$_AlreadyInst$DM_INST\n\n$_DmChBody" 0 0 4 \ - ${DM_LIST} 2>${PACKAGES} - clear - - # If a selection has been made, act - if [[ $(cat ${PACKAGES}) != "" ]]; then - - # check if selected dm already installed. If so, enable and break loop. - for i in ${DM_INST}; do - if [[ $(cat ${PACKAGES}) == ${i} ]]; then - enable_dm - break; + # Save repetition of code + enable_dm() { + if [[ -e /tmp/.openrc ]]; then + sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"$(cat ${PACKAGES})\"/g" /mnt/etc/conf.d/xdm + arch_chroot "rc-update add xdm default" 2>/tmp/.errlog + check_for_error + DM=$(cat ${PACKAGES}) + DM_ENABLED=1 + else + # enable display manager for systemd + arch_chroot "systemctl enable $(cat ${PACKAGES})" 2>/tmp/.errlog + check_for_error + DM=$(cat ${PACKAGES}) + DM_ENABLED=1 fi - done + } - # If no match found, install and enable DM - if [[ $DM_ENABLED -eq 0 ]]; then + if [[ $DM_ENABLED -eq 0 ]]; then + # Prep variables + echo "" > ${PACKAGES} + dm_list="gdm lxdm lightdm sddm" + DM_LIST="" + DM_INST="" - # Where lightdm selected, add gtk greeter package - sed -i 's/lightdm/lightdm lightdm-gtk-greeter/' ${PACKAGES} - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog + # Generate list of DMs installed with DEs, and a list for selection menu + for i in ${dm_list}; do + [[ -e ${MOUNTPOINT}/usr/bin/${i} ]] && DM_INST="${DM_INST} ${i}" + DM_LIST="${DM_LIST} ${i} -" + done - # Where lightdm selected, now remove the greeter package - sed -i 's/lightdm-gtk-greeter//' ${PACKAGES} - enable_dm - fi + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_DmChTitle " --menu "$_AlreadyInst$DM_INST\n\n$_DmChBody" 0 0 4 \ + ${DM_LIST} 2>${PACKAGES} + clear + + # If a selection has been made, act + if [[ $(cat ${PACKAGES}) != "" ]]; then + # check if selected dm already installed. If so, enable and break loop. + for i in ${DM_INST}; do + if [[ $(cat ${PACKAGES}) == ${i} ]]; then + enable_dm + break; + fi + done + + # If no match found, install and enable DM + if [[ $DM_ENABLED -eq 0 ]]; then + # Where lightdm selected, add gtk greeter package + sed -i 's/lightdm/lightdm lightdm-gtk-greeter/' ${PACKAGES} + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog + + # Where lightdm selected, now remove the greeter package + sed -i 's/lightdm-gtk-greeter//' ${PACKAGES} + enable_dm + fi + fi fi - fi - # Show after successfully installing or where attempting to repeat when already completed. - [[ $DM_ENABLED -eq 1 ]] && dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_DmChTitle " --msgbox "$_DmDoneBody" 0 0 + # Show after successfully installing or where attempting to repeat when already completed. + [[ $DM_ENABLED -eq 1 ]] && dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_DmChTitle " --msgbox "$_DmDoneBody" 0 0 } # Network Manager install_nm() { -# Save repetition of code -enable_nm() { - # Add openrc support. If openrcbase was installed, the file /tmp/.openrc should exist. - if [[ $(cat ${PACKAGES}) == "NetworkManager" ]]; then - arch_chroot "systemctl enable NetworkManager.service && systemctl enable NetworkManager-dispatcher.service" >/tmp/.symlink 2>/tmp/.errlog - else - arch_chroot "systemctl enable $(cat ${PACKAGES})" 2>/tmp/.errlog - fi + # Save repetition of code + enable_nm() { - check_for_error - NM_ENABLED=1 -} + # Add openrc support. If openrcbase was installed, the file /tmp/.openrc should exist. + if [[ $(cat ${PACKAGES}) == "NetworkManager" ]]; then + arch_chroot "systemctl enable NetworkManager.service && systemctl enable NetworkManager-dispatcher.service" >/tmp/.symlink 2>/tmp/.errlog + else + arch_chroot "systemctl enable $(cat ${PACKAGES})" 2>/tmp/.errlog + fi - if [[ $NM_ENABLED -eq 0 ]]; then - # Prep variables - echo "" > ${PACKAGES} - nm_list="connman CLI dhcpcd CLI netctl CLI NetworkManager GUI wicd GUI" - NM_LIST="" - NM_INST="" + check_for_error + NM_ENABLED=1 + } - # Generate list of DMs installed with DEs, and a list for selection menu - for i in ${nm_list}; do - [[ -e ${MOUNTPOINT}/usr/bin/${i} ]] && NM_INST="${NM_INST} ${i}" - NM_LIST="${NM_LIST} ${i}" - done + if [[ $NM_ENABLED -eq 0 ]]; then + # Prep variables + echo "" > ${PACKAGES} + nm_list="connman CLI dhcpcd CLI netctl CLI NetworkManager GUI wicd GUI" + NM_LIST="" + NM_INST="" - # Remove netctl from selectable list as it is a PITA to configure via arch_chroot - NM_LIST=$(echo $NM_LIST | sed "s/netctl CLI//") + # Generate list of DMs installed with DEs, and a list for selection menu + for i in ${nm_list}; do + [[ -e ${MOUNTPOINT}/usr/bin/${i} ]] && NM_INST="${NM_INST} ${i}" + NM_LIST="${NM_LIST} ${i}" + done - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstNMTitle " --menu "$_AlreadyInst $NM_INST\n$_InstNMBody" 0 0 4 \ - ${NM_LIST} 2> ${PACKAGES} - clear + # Remove netctl from selectable list as it is a PITA to configure via arch_chroot + NM_LIST=$(echo $NM_LIST | sed "s/netctl CLI//") - # If a selection has been made, act - if [[ $(cat ${PACKAGES}) != "" ]]; then + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstNMTitle " --menu "$_AlreadyInst $NM_INST\n$_InstNMBody" 0 0 4 \ + ${NM_LIST} 2> ${PACKAGES} + clear - # check if selected nm already installed. If so, enable and break loop. - for i in ${NM_INST}; do - [[ $(cat ${PACKAGES}) == ${i} ]] && enable_nm && break - done + # If a selection has been made, act + if [[ $(cat ${PACKAGES}) != "" ]]; then + # check if selected nm already installed. If so, enable and break loop. + for i in ${NM_INST}; do + [[ $(cat ${PACKAGES}) == ${i} ]] && enable_nm && break + done - # If no match found, install and enable NM - if [[ $NM_ENABLED -eq 0 ]]; then + # If no match found, install and enable NM + if [[ $NM_ENABLED -eq 0 ]]; then + # Where networkmanager selected, add network-manager-applet + sed -i 's/NetworkManager/networkmanager network-manager-applet/g' ${PACKAGES} + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog - # Where networkmanager selected, add network-manager-applet - sed -i 's/NetworkManager/networkmanager network-manager-applet/g' ${PACKAGES} - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog - - # Where networkmanager selected, now remove network-manager-applet - sed -i 's/networkmanager network-manager-applet/NetworkManager/g' ${PACKAGES} - enable_nm - fi + # Where networkmanager selected, now remove network-manager-applet + sed -i 's/networkmanager network-manager-applet/NetworkManager/g' ${PACKAGES} + enable_nm + fi + fi fi - fi - - # Show after successfully installing or where attempting to repeat when already completed. - [[ $NM_ENABLED -eq 1 ]] && dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstNMTitle " --msgbox "$_InstNMErrBody" 0 0 + # Show after successfully installing or where attempting to repeat when already completed. + [[ $NM_ENABLED -eq 1 ]] && dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstNMTitle " --msgbox "$_InstNMErrBody" 0 0 } @@ -2656,6 +2665,7 @@ greeting() { # Preparation prep_menu() { + if [[ $SUB_MENU != "prep_menu" ]]; then SUB_MENU="prep_menu" HIGHLIGHT_SUB=1 @@ -2663,7 +2673,8 @@ prep_menu() { HIGHLIGHT_SUB=$(( HIGHLIGHT_SUB + 1 )) fi - dialog --default-item ${HIGHLIGHT_SUB} --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_PrepMenuTitle " --column-separator "|" --menu "$_PrepMenuBody" 0 0 7 \ + dialog --default-item ${HIGHLIGHT_SUB} --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_PrepMenuTitle " --column-separator "|" \ + --menu "$_PrepMenuBody" 0 0 7 \ "1" "$_VCKeymapTitle|>" \ "2" "$_DevShowOpt" \ "3" "$_PrepPartDisk" \ @@ -2762,22 +2773,22 @@ config_base_menu() { HIGHLIGHT_SUB=$(cat ${ANSWER}) case $(cat ${ANSWER}) in "1") generate_fstab - ;; + ;; "2") set_hostname - ;; + ;; "3") set_locale - ;; + ;; "4") set_timezone - set_hw_clock - ;; + set_hw_clock + ;; "5") set_root_password - ;; + ;; "6") create_new_user - ;; + ;; "7") run_mkinitcpio - ;; + ;; *) main_menu_online - ;; + ;; esac config_base_menu @@ -2793,9 +2804,10 @@ install_vanilla_de_wm() { HIGHLIGHT_SUB=$(( HIGHLIGHT_SUB + 1 )) fi - dialog --default-item ${HIGHLIGHT_SUB} --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstGrMenuTitle " --column-separator "|" --menu "$_InstGrMenuBody" 0 0 8 \ + dialog --default-item ${HIGHLIGHT_SUB} --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstGrMenuTitle " --column-separator "|" \ + --menu "$_InstGrMenuBody" 0 0 8 \ "1" "$_InstGrMenuDS|>" \ - "2" "Install Desktop environment|>" \ + "2" "$_InstGrDE|>" \ "3" "$_InstGrMenuDM|>" \ "4" "$_Back" 2>${ANSWER} @@ -2826,26 +2838,26 @@ install_deskop_menu() { HIGHLIGHT_SUB=$(( HIGHLIGHT_SUB + 1 )) fi - dialog --default-item ${HIGHLIGHT_SUB} --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstGrMenuTitle " --column-separator "|" --menu "$_InstDEMenuTitle" 0 0 8 \ + dialog --default-item ${HIGHLIGHT_SUB} --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstGrMenuTitle " --column-separator "|" \ + --menu "$_InstDEMenuTitle" 0 0 8 \ "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 - ;; + 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 + HIGHLIGHT_SUB=2 + install_graphics_menu + ;; + esac install_deskop_menu @@ -2860,7 +2872,8 @@ install_graphics_menu() { HIGHLIGHT_SUB=$(( HIGHLIGHT_SUB + 1 )) fi - dialog --default-item ${HIGHLIGHT_SUB} --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstGrMenuTitle " --column-separator "|" --menu "$_InstGrMenuBody" 0 0 8 \ + dialog --default-item ${HIGHLIGHT_SUB} --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_InstGrMenuTitle " --column-separator "|" \ + --menu "$_InstGrMenuBody" 0 0 8 \ "1" "$_InstGrMenuDD|>" \ "2" "$_InstGrMenuGE|>" \ "3" "$_PrepKBLayout|>" \ @@ -2869,13 +2882,13 @@ install_graphics_menu() { HIGHLIGHT_SUB=$(cat ${ANSWER}) case $(cat ${ANSWER}) in "1") setup_graphics_card - ;; + ;; "2") install_deskop_menu - ;; + ;; "3") set_xkbmap - ;; + ;; *) main_menu_online - ;; + ;; esac install_graphics_menu @@ -2947,40 +2960,40 @@ edit_configs() { 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 - ;; + [[ -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" - ;; + [[ -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 + for i in ${user_list}; do + [[ -e ${MOUNTPOINT}/home/$i/.xinitrc ]] && FILE="$FILE ${MOUNTPOINT}/home/$i/.xinitrc" + done ;; *) main_menu_online ;; @@ -3028,30 +3041,29 @@ main_menu_online() { 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 - ;; - *) dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "$_CloseInstBody" 0 0 - - if [[ $? -eq 0 ]]; then + ;; + *) dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "$_CloseInstBody" 0 0 + if [[ $? -eq 0 ]]; then umount_partitions [[ -e /tmp/.openrc ]] && rm /tmp/.openrc clear exit 0 fi - ;; + ;; esac main_menu_online