You've already forked al-installer
Add reboot back with attempted fix, add shell choice, always create a new user
This commit is contained in:
@ -14,11 +14,11 @@
|
||||
# globals {
|
||||
|
||||
# immutable values
|
||||
readonly VER="1.7.14" # Installer version
|
||||
readonly VER="1.7.15" # Installer version
|
||||
readonly DIST="ArchLabs" # Linux distributor
|
||||
readonly LIVE="liveuser" # Live session user
|
||||
readonly MNT="/mnt/install" # Install mountpoint
|
||||
readonly ERR="/tmp/errlog" # Built-in error log
|
||||
readonly DBG="/tmp/debuglog" # Built-in error log
|
||||
|
||||
# mutable values
|
||||
declare -g WARN=false
|
||||
@ -45,6 +45,7 @@ declare -g INSTALL_WMS=""
|
||||
declare -g KERNEL=""
|
||||
declare -g WM_PACKAGES=""
|
||||
declare -g PACKAGES=""
|
||||
declare -g MYSHELL=""
|
||||
declare -g MKINIT_HOOKS="shutdown"
|
||||
|
||||
# }
|
||||
@ -307,7 +308,7 @@ select_login_method() {
|
||||
WM_PACKAGES+=" lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice"
|
||||
EDIT_FILES[11]="/etc/lightdm/lightdm.conf /etc/lightdm/lightdm-gtk-greeter.conf"
|
||||
else
|
||||
EDIT_FILES[11]="/home/$NEWUSER/.xinitrc /home/$NEWUSER/.zprofile /home/$NEWUSER/.xprofile"
|
||||
EDIT_FILES[11]="/home/$NEWUSER/.xinitrc /home/$NEWUSER/.xprofile"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -474,7 +475,6 @@ display_system_settings() {
|
||||
|
||||
------------ SYSTEM CONFIGURATION -------------
|
||||
|
||||
User: ${NEWUSER:-None}
|
||||
Locale: ${LOCALE:-None}
|
||||
Keymap: ${KEYMAP:-None}
|
||||
Hostname: ${HOSTNAME:-None}
|
||||
@ -483,6 +483,8 @@ display_system_settings() {
|
||||
|
||||
------------ LOGIN CONFIGURATION --------------
|
||||
|
||||
User: ${NEWUSER:-None}
|
||||
Shell: ${MYSHELL:-None}
|
||||
Session: ${LOGIN_WM:-None}
|
||||
Autologin: ${AUTOLOGIN:-None}
|
||||
Management: ${LOGIN_TYPE:-None}
|
||||
@ -512,6 +514,11 @@ configure_system_settings() {
|
||||
select_timezone || return 1
|
||||
user_creation || return 1
|
||||
|
||||
if ! MYSHELL="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||
--title " $_ShellTitle " --menu "$_ShellBody" 0 0 0 '/bin/zsh' '-' '/bin/bash' '-')"; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
tput civis
|
||||
if [[ $HAS_NETWORK == true ]]; then
|
||||
if ! KERNEL="$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||
@ -530,7 +537,7 @@ configure_system_settings() {
|
||||
INSTALL_WMS='openbox'
|
||||
LOGIN_WM='openbox-session'
|
||||
MIRROR_CMD="reflector --score 100 -l 50 -f 10 --sort rate --verbose"
|
||||
EDIT_FILES[11]="/home/$NEWUSER/.xinitrc /home/$NEWUSER/.zprofile /home/$NEWUSER/.xprofile"
|
||||
EDIT_FILES[11]="/home/$NEWUSER/.xinitrc /home/$NEWUSER/.xprofile"
|
||||
fi
|
||||
|
||||
export CONFIG_DONE=true
|
||||
@ -546,7 +553,7 @@ edit_system_configs() {
|
||||
|
||||
tput civis
|
||||
local exitstr
|
||||
[[ $DEBUG == true ]] && exitstr="View Log & Exit" || exitstr="Exit"
|
||||
[[ $DEBUG == true ]] && exitstr="View Log & Reboot" || exitstr="Reboot"
|
||||
|
||||
SELECTED=$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||
--title " $_EditTitle " --default-item $SELECTED --menu "$_EditBody" 0 0 0 \
|
||||
@ -555,8 +562,8 @@ edit_system_configs() {
|
||||
"9" "${BOOTLDR^}" "10" "Pacman.conf" "11" "${LOGIN_TYPE^}")
|
||||
|
||||
if [[ ! $SELECTED || $SELECTED -eq 1 ]]; then
|
||||
[[ $DEBUG == true ]] && more /tmp/debug-log
|
||||
die
|
||||
[[ $DEBUG == true ]] && more $DEBUG
|
||||
die 127
|
||||
else
|
||||
local existing_files=""
|
||||
for f in $(printf "%s" "${EDIT_FILES[$SELECTED]}"); do
|
||||
|
Reference in New Issue
Block a user