new (temporary) menu structure, remove switch

merge-requests/273/head
Bernhard Landauer 8 years ago
parent afe00ad500
commit a984ffb905

@ -29,13 +29,4 @@ select_language
mk_connection
check_requirements
greeting
menu_choice
if [[ $menu_opt == "$_InstAdvBase" ]]; then
import ${LIBDIR}/util-menu-full.sh
import ${LIBDIR}/util-desktop-full.sh
main_menu_full
else
main_menu
fi
main_menu

@ -0,0 +1,51 @@
main_menu
├── prepare
│ ├── keymap
│ ├── devices
│ ├── partition
│ ├── luks
│ ├── lvm
│ └── mount
├── install_base
│ ├── config_mirrors
│ ├── refresh_keys
│ ├── install_base
│ └── bootloader
├── config_base
│ ├── fstab
│ ├── hostname
│ ├── locale
│ ├── time_n_date
│ ├── root_pw
│ ├── create_user
│ └── mkinitcpio
├── install_environment
│ ├── video_driver
│ └── xkbmap
│ └── manjaro_DE_WM
├── edit_config
│ ├── vconsole
│ ├── locale
│ ├── hostname
│ ├── hosts
│ ├── sudoers
│ ├── mkinitcpio
│ ├── fstab
│ ├── crypttab
│ ├── grub/syslinux
│ ├── lxdm/lightdm/sddm
│ ├── pacman
│ └── xinitrc
└── advanced_install
├── manjaro_git
├── unconfigured
│ ├── xorg
│ ├── de_wm
│ ├── dm
│ ├── network
│ ├── multimedia
│ │ ├── alsa_pulse
│ │ ├── codecs
│ │ └── acc
│ └── custom_pkgs
└── system_tweaks

@ -32,6 +32,42 @@ install_manjaro_de_wm_git() {
install_manjaro_de_wm
}
install_vanilla_de_wm() {
local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
submenu 7
DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \
--menu "$_InstGrMenuBody" 0 0 7 \
"1" "$_InstGrMenuDS" \
"2" "$_InstGrDE" \
"3" "$_InstGrMenuDM" \
"4" "$_InstNMMenuTitle|>" \
"5" "$_InstMultMenuTitle|>" \
"6" "$_InstMulCust" \
"7" "$_Back" 2>${ANSWER}
HIGHLIGHT_SUB=$(cat ${ANSWER})
case $(cat ${ANSWER}) in
"1") install_xorg_input
;;
"2") install_de_wm
;;
"3") install_dm
;;
"4") install_network_menu
;;
"5") install_multimedia_menu
;;
"6") install_cust_pkgs
;;
*) loopmenu=0
return 0
;;
esac
done
}
# Install xorg and input drivers. Also copy the xkbmap configuration file created earlier to the installed system
install_xorg_input() {
echo "" > ${PACKAGES}
@ -66,6 +102,80 @@ install_xorg_input() {
HIGHLIGHT_SUB=1
}
install_de_wm() {
# Only show this information box once
if [[ $SHOW_ONCE -eq 0 ]]; then
DIALOG " $_InstDETitle " --msgbox "$_DEInfoBody" 0 0
SHOW_ONCE=1
fi
# DE/WM Menu
DIALOG " $_InstDETitle " --checklist "\n$_InstDEBody\n\n$_UseSpaceBar" 0 0 13 \
"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>$ERR
check_for_error "${FUNCNAME}: ${PACKAGES}" "$?"
# Clear the packages file for installation of "common" packages
echo "" > ${PACKAGES}
# Offer to install various "common" packages.
DIALOG " $_InstComTitle " --checklist "\n$_InstComBody\n\n$_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>$ERR
check_for_error "basestrap ${MOUNTPOINT} $(cat ${PACKAGES})" "$?"
fi
fi
}
# Display Manager
install_dm() {
if [[ $DM_ENABLED -eq 0 ]]; then
@ -128,6 +238,41 @@ enable_dm() {
fi
}
install_network_menu() {
declare -i loopmenu=1
while ((loopmenu)); do
local PARENT="$FUNCNAME"
submenu 5
DIALOG " $_InstNMMenuTitle " --default-item ${HIGHLIGHT_SUB} --menu "$_InstNMMenuBody" 0 0 5 \
"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 " $_WirelessShowTitle " --textbox /tmp/.wireless 0 0
else
DIALOG " $_WirelessShowTitle " --msgbox "$_WirelessErrBody" 7 30
fi
;;
"2") install_wireless_packages
;;
"3") install_nm
;;
"4") install_cups
;;
*) loopmenu=0
return 0
;;
esac
done
}
# ntp not exactly wireless, but this menu is the best fit.
install_wireless_packages() {
@ -258,6 +403,35 @@ install_cups() {
fi
}
install_multimedia_menu() {
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_alsa_pulse() {
# Prep Variables
echo "" > ${PACKAGES}
@ -313,6 +487,35 @@ install_codecs() {
fi
}
# Install Accessibility Applications
install_acc_menu() {
echo "" > ${PACKAGES}
DIALOG " $_InstAccTitle " --checklist "$_InstAccBody" 0 0 15 \
"accerciser" "-" off \
"at-spi2-atk" "-" off \
"at-spi2-core" "-" off \
"brltty" "-" off \
"caribou" "-" off \
"dasher" "-" off \
"espeak" "-" off \
"espeakup" "-" off \
"festival" "-" off \
"java-access-bridge" "-" off \
"java-atk-wrapper" "-" off \
"julius" "-" off \
"orca" "-" off \
"qt-at-spi" "-" off \
"speech-dispatcher" "-" off 2>${PACKAGES}
clear
# If something has been selected, install
if [[ $(cat ${PACKAGES}) != "" ]]; then
basestrap ${MOUNTPOINT} ${PACKAGES} 2>$ERR
check_for_error "$FUNCNAME" $? || return $?
fi
}
install_cust_pkgs() {
echo "" > ${PACKAGES}
DIALOG " $_InstMulCust " --inputbox "$_InstMulCustBody" 0 0 "" 2>${PACKAGES} || return 0
@ -328,3 +531,77 @@ install_cust_pkgs() {
fi
fi
}
security_menu() {
declare -i loopmenu=1
while ((loopmenu)); do
local PARENT="$FUNCNAME"
submenu 4
DIALOG " $_SecMenuTitle " --default-item ${HIGHLIGHT_SUB} \
--menu "$_SecMenuBody" 0 0 4 \
"1" "$_SecJournTitle" \
"2" "$_SecCoreTitle" \
"3" "$_SecKernTitle " \
"4" "$_Back" 2>${ANSWER}
HIGHLIGHT_SUB=$(cat ${ANSWER})
case $(cat ${ANSWER}) in
# systemd-journald
"1") DIALOG " $_SecJournTitle " --menu "$_SecJournBody" 0 0 7 \
"$_Edit" "/etc/systemd/journald.conf" \
"10M" "SystemMaxUse=10M" \
"20M" "SystemMaxUse=20M" \
"50M" "SystemMaxUse=50M" \
"100M" "SystemMaxUse=100M" \
"200M" "SystemMaxUse=200M" \
"$_Disable" "Storage=none" 2>${ANSWER}
if [[ $(cat ${ANSWER}) != "" ]]; then
if [[ $(cat ${ANSWER}) == "$_Disable" ]]; then
sed -i "s/#Storage.*\|Storage.*/Storage=none/g" ${MOUNTPOINT}/etc/systemd/journald.conf
sed -i "s/SystemMaxUse.*/#&/g" ${MOUNTPOINT}/etc/systemd/journald.conf
DIALOG " $_SecJournTitle " --infobox "\n$_Done!\n\n" 0 0
sleep 2
elif [[ $(cat ${ANSWER}) == "$_Edit" ]]; then
nano ${MOUNTPOINT}/etc/systemd/journald.conf
else
sed -i "s/#SystemMaxUse.*\|SystemMaxUse.*/SystemMaxUse=$(cat ${ANSWER})/g" ${MOUNTPOINT}/etc/systemd/journald.conf
sed -i "s/Storage.*/#&/g" ${MOUNTPOINT}/etc/systemd/journald.conf
DIALOG " $_SecJournTitle " --infobox "\n$_Done!\n\n" 0 0
sleep 2
fi
fi
;;
# core dump
"2") DIALOG " $_SecCoreTitle " --menu "$_SecCoreBody" 0 0 2 \
"$_Disable" "Storage=none" \
"$_Edit" "/etc/systemd/coredump.conf" 2>${ANSWER}
if [[ $(cat ${ANSWER}) == "$_Disable" ]]; then
sed -i "s/#Storage.*\|Storage.*/Storage=none/g" ${MOUNTPOINT}/etc/systemd/coredump.conf
DIALOG " $_SecCoreTitle " --infobox "\n$_Done!\n\n" 0 0
sleep 2
elif [[ $(cat ${ANSWER}) == "$_Edit" ]]; then
nano ${MOUNTPOINT}/etc/systemd/coredump.conf
fi
;;
# Kernel log access
"3") DIALOG " $_SecKernTitle " --menu "$_SecKernBody" 0 0 2 \
"$_Disable" "kernel.dmesg_restrict = 1" \
"$_Edit" "/etc/systemd/coredump.conf.d/custom.conf" 2>${ANSWER}
case $(cat ${ANSWER}) in
"$_Disable") echo "kernel.dmesg_restrict = 1" > ${MOUNTPOINT}/etc/sysctl.d/50-dmesg-restrict.conf
DIALOG " $_SecKernTitle " --infobox "\n$_Done!\n\n" 0 0
sleep 2 ;;
"$_Edit") [[ -e ${MOUNTPOINT}/etc/sysctl.d/50-dmesg-restrict.conf ]] && nano ${MOUNTPOINT}/etc/sysctl.d/50-dmesg-restrict.conf || \
DIALOG " $_SeeConfErrTitle " --msgbox "$_SeeConfErrBody1" 0 0 ;;
esac
;;
*) loopmenu=0
return 0
;;
esac
done
}

@ -1,377 +0,0 @@
# !/bin/bash
#
# Architect Installation Framework (2016-2017)
#
# Written by Carl Duff and @mandog for Archlinux
# Heavily modified and re-written by @Chrysostomus to install Manjaro instead
# Contributors: @papajoker, @oberon and the Manjaro-Community.
#
# This program is free software, provided under the GNU General Public License
# as published by the Free Software Foundation. So feel free to copy, distribute,
# or modify it as you wish.
main_menu_full() {
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})
case $(cat ${ANSWER}) in
"1") prep_menu
;;
"2") check_mount && install_base_menu
;;
"3") check_base && install_graphics_menu_full
;;
"4") check_base && config_base_menu
;;
"5") check_base && install_network_menu
;;
"6") check_base && install_multimedia_menu
;;
"7") check_base && security_menu
;;
"8") check_base && edit_configs
;;
*) loopmenu=0
exit_done
;;
esac
done
}
install_graphics_menu_full() {
local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
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
return 0
;;
esac
done
}
install_desktop_menu() {
local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
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
return 0
;;
esac
done
}
install_vanilla_de_wm() {
local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
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
return 0
;;
esac
done
}
install_de_wm() {
# Only show this information box once
if [[ $SHOW_ONCE -eq 0 ]]; then
DIALOG " $_InstDETitle " --msgbox "$_DEInfoBody" 0 0
SHOW_ONCE=1
fi
# DE/WM Menu
DIALOG " $_InstDETitle " --checklist "\n$_InstDEBody\n\n$_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>$ERR
check_for_error "${FUNCNAME}: ${PACKAGES}" "$?"
# Clear the packages file for installation of "common" packages
echo "" > ${PACKAGES}
# Offer to install various "common" packages.
DIALOG " $_InstComTitle " --checklist "\n$_InstComBody\n\n$_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>$ERR
check_for_error "basestrap ${MOUNTPOINT} $(cat ${PACKAGES})" "$?"
fi
fi
}
install_network_menu() {
declare -i loopmenu=1
while ((loopmenu)); do
local PARENT="$FUNCNAME"
submenu 5
DIALOG " $_InstNMMenuTitle " --default-item ${HIGHLIGHT_SUB} --menu "$_InstNMMenuBody" 0 0 5 \
"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 " $_WirelessShowTitle " --textbox /tmp/.wireless 0 0
else
DIALOG " $_WirelessShowTitle " --msgbox "$_WirelessErrBody" 7 30
fi
;;
"2") install_wireless_packages
;;
"3") install_nm
;;
"4") install_cups
;;
*) loopmenu=0
return 0
;;
esac
done
}
install_multimedia_menu() {
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 Accessibility Applications
install_acc_menu() {
echo "" > ${PACKAGES}
DIALOG " $_InstAccTitle " --checklist "$_InstAccBody" 0 0 15 \
"accerciser" "-" off \
"at-spi2-atk" "-" off \
"at-spi2-core" "-" off \
"brltty" "-" off \
"caribou" "-" off \
"dasher" "-" off \
"espeak" "-" off \
"espeakup" "-" off \
"festival" "-" off \
"java-access-bridge" "-" off \
"java-atk-wrapper" "-" off \
"julius" "-" off \
"orca" "-" off \
"qt-at-spi" "-" off \
"speech-dispatcher" "-" off 2>${PACKAGES}
clear
# If something has been selected, install
if [[ $(cat ${PACKAGES}) != "" ]]; then
basestrap ${MOUNTPOINT} ${PACKAGES} 2>$ERR
check_for_error "$FUNCNAME" $? || return $?
fi
}
security_menu() {
declare -i loopmenu=1
while ((loopmenu)); do
local PARENT="$FUNCNAME"
submenu 4
DIALOG " $_SecMenuTitle " --default-item ${HIGHLIGHT_SUB} \
--menu "$_SecMenuBody" 0 0 4 \
"1" "$_SecJournTitle" \
"2" "$_SecCoreTitle" \
"3" "$_SecKernTitle " \
"4" "$_Back" 2>${ANSWER}
HIGHLIGHT_SUB=$(cat ${ANSWER})
case $(cat ${ANSWER}) in
# systemd-journald
"1") DIALOG " $_SecJournTitle " --menu "$_SecJournBody" 0 0 7 \
"$_Edit" "/etc/systemd/journald.conf" \
"10M" "SystemMaxUse=10M" \
"20M" "SystemMaxUse=20M" \
"50M" "SystemMaxUse=50M" \
"100M" "SystemMaxUse=100M" \
"200M" "SystemMaxUse=200M" \
"$_Disable" "Storage=none" 2>${ANSWER}
if [[ $(cat ${ANSWER}) != "" ]]; then
if [[ $(cat ${ANSWER}) == "$_Disable" ]]; then
sed -i "s/#Storage.*\|Storage.*/Storage=none/g" ${MOUNTPOINT}/etc/systemd/journald.conf
sed -i "s/SystemMaxUse.*/#&/g" ${MOUNTPOINT}/etc/systemd/journald.conf
DIALOG " $_SecJournTitle " --infobox "\n$_Done!\n\n" 0 0
sleep 2
elif [[ $(cat ${ANSWER}) == "$_Edit" ]]; then
nano ${MOUNTPOINT}/etc/systemd/journald.conf
else
sed -i "s/#SystemMaxUse.*\|SystemMaxUse.*/SystemMaxUse=$(cat ${ANSWER})/g" ${MOUNTPOINT}/etc/systemd/journald.conf
sed -i "s/Storage.*/#&/g" ${MOUNTPOINT}/etc/systemd/journald.conf
DIALOG " $_SecJournTitle " --infobox "\n$_Done!\n\n" 0 0
sleep 2
fi
fi
;;
# core dump
"2") DIALOG " $_SecCoreTitle " --menu "$_SecCoreBody" 0 0 2 \
"$_Disable" "Storage=none" \
"$_Edit" "/etc/systemd/coredump.conf" 2>${ANSWER}
if [[ $(cat ${ANSWER}) == "$_Disable" ]]; then
sed -i "s/#Storage.*\|Storage.*/Storage=none/g" ${MOUNTPOINT}/etc/systemd/coredump.conf
DIALOG " $_SecCoreTitle " --infobox "\n$_Done!\n\n" 0 0
sleep 2
elif [[ $(cat ${ANSWER}) == "$_Edit" ]]; then
nano ${MOUNTPOINT}/etc/systemd/coredump.conf
fi
;;
# Kernel log access
"3") DIALOG " $_SecKernTitle " --menu "$_SecKernBody" 0 0 2 \
"$_Disable" "kernel.dmesg_restrict = 1" \
"$_Edit" "/etc/systemd/coredump.conf.d/custom.conf" 2>${ANSWER}
case $(cat ${ANSWER}) in
"$_Disable") echo "kernel.dmesg_restrict = 1" > ${MOUNTPOINT}/etc/sysctl.d/50-dmesg-restrict.conf
DIALOG " $_SecKernTitle " --infobox "\n$_Done!\n\n" 0 0
sleep 2 ;;
"$_Edit") [[ -e ${MOUNTPOINT}/etc/sysctl.d/50-dmesg-restrict.conf ]] && nano ${MOUNTPOINT}/etc/sysctl.d/50-dmesg-restrict.conf || \
DIALOG " $_SeeConfErrTitle " --msgbox "$_SeeConfErrBody1" 0 0 ;;
esac
;;
*) loopmenu=0
return 0
;;
esac
done
}

@ -13,18 +13,19 @@
main_menu() {
declare -i loopmenu=1
while ((loopmenu)); do
if [[ $HIGHLIGHT != 6 ]]; then
if [[ $HIGHLIGHT != 7 ]]; then
HIGHLIGHT=$(( HIGHLIGHT + 1 ))
fi
DIALOG " $_MMTitle " --default-item ${HIGHLIGHT} \
--menu "$_MMBody" 0 0 6 \
--menu "$_MMBody" 0 0 7 \
"1" "$_PrepMenuTitle|>" \
"2" "$_InstBsMenuTitle|>" \
"3" "$_InstGrMenuTitle|>" \
"4" "$_ConfBseMenuTitle|>" \
"3" "$_ConfBseMenuTitle|>" \
"4" "$_InstGrMenuTitle|>" \
"5" "$_SeeConfOptTitle|>" \
"6" "$_Done" 2>${ANSWER}
"6" "$_InstAdvBase|>" \
"7" "$_Done" 2>${ANSWER}
HIGHLIGHT=$(cat ${ANSWER})
case $(cat ${ANSWER}) in
@ -32,12 +33,15 @@ main_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
;;
"6") check_base && import ${LIBDIR}/util-advanced.sh
advanced_menu
;;
*) loopmenu=0
exit_done
;;
@ -45,13 +49,15 @@ main_menu() {
done
}
## 2nd level menus
# Preparation
prep_menu() {
local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
submenu 7
DIALOG "$_PrepMenuTitle " --default-item ${HIGHLIGHT_SUB} \
DIALOG " $_PrepMenuTitle " --default-item ${HIGHLIGHT_SUB} \
--menu "$_PrepMenuBody" 0 0 7 \
"1" "$_VCKeymapTitle" \
"2" "$_DevShowOpt" \
@ -126,8 +132,7 @@ config_base_menu() {
declare -i loopmenu=1
while ((loopmenu)); do
submenu 8
DIALOG "$_ConfBseBody" --default-item ${HIGHLIGHT_SUB} --menu " $_ConfBseMenuTitle " \
0 0 8 \
DIALOG " $_ConfBseBody " --default-item ${HIGHLIGHT_SUB} --menu " $_ConfBseMenuTitle " 0 0 8 \
"1" "$_ConfBseFstab" \
"2" "$_ConfBseHost" \
"3" "$_ConfBseSysLoc" \
@ -166,20 +171,19 @@ install_graphics_menu() {
declare -i loopmenu=1
while ((loopmenu)); do
submenu 4
DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \
--menu "$_InstGrMenuBody" 0 0 4 \
DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} --menu "$_InstGrMenuBody" 0 0 4 \
"1" "$_InstGrMenuDD" \
"2" "$_InstDEStable" \
"3" "$_PrepKBLayout" \
"2" "$_PrepKBLayout" \
"3" "$_InstDEStable" \
"4" "$_Back" 2>${ANSWER}
HIGHLIGHT_SUB=$(cat ${ANSWER})
case $(cat ${ANSWER}) in
"1") setup_graphics_card
;;
"2") install_manjaro_de_wm_pkg
"2") set_xkbmap
;;
"3") set_xkbmap
"3") install_manjaro_de_wm_pkg
;;
*) loopmenu=0
return 0
@ -207,7 +211,7 @@ edit_configs() {
"6" "/etc/mkinitcpio.conf" \
"7" "/etc/fstab" \
"8" "/etc/crypttab" \
"9" "grub/syslinux/systemd-boot" \
"9" "grub/syslinux" \
"10" "lxdm/lightdm/sddm" \
"11" "/etc/pacman.conf" \
"12" "~/.xinitrc" \
@ -268,4 +272,30 @@ edit_configs() {
DIALOG " $_ErrTitle " --msgbox "$_SeeConfErrBody" 0 0
fi
done
}
}
advanced_menu() {
declare -i loopmenu=1
while ((loopmenu)); do
submenu 4
DIALOG " $_InstAdvBase " --default-item ${HIGHLIGHT_SUB} \
--menu "$" 0 0 4 \
"1" "$_InstDEGit" \
"2" "$_InstDE|>" \
"3" "$_SecMenuTitle|>" \
"4" "$_Back" 2>${ANSWER}
HIGHLIGHT_SUB=$(cat ${ANSWER})
case $(cat ${ANSWER}) in
"1") check_base && install_manjaro_de_wm_git
;;
"2") check_base && install_vanilla_de_wm
;;
"3") check_base && security_menu
;;
*) loopmenu=0
return 0
;;
esac
done
}

Loading…
Cancel
Save