Preserve choices made for early setup for additional runs

This commit is contained in:
natemaia 2020-05-14 21:06:50 -07:00
parent b7e6c053e1
commit e6f3e606bd

View File

@ -7,7 +7,7 @@
# shellcheck disable=SC2086,SC2046,SC2254,SC2164
VER=2.1.49
VER=2.1.50
# default values {
@ -625,6 +625,7 @@ select_mkuser()
select_keymap()
{
if [[ ! -f /tmp/xkeys ]]; then
dlg KEYMAP menu "Keyboard" "$_keymap" \
us English cm English gb English au English gh English \
za English ng English ca French 'cd' French gn French \
@ -647,11 +648,21 @@ select_keymap()
by Belarusian az Azerbaijani mk Macedonian kh Khmer epo Esperanto \
me Montenegrin || return 1
echo "$KEYMAP" > /tmp/xkeys
else
KEYMAP="$(< /tmp/xkeys)"
fi
if [[ ! -f /tmp/ckeys ]]; then
if [[ $CMAPS == *"$KEYMAP "* ]]; then
CMAP="$KEYMAP"
else
dlg CMAP menu "Console Keymap" "$_vconsole" $CMAPS || return 1
fi
echo "$CMAP" > /tmp/ckeys
else
CMAP="$(< /tmp/ckeys)"
fi
if [[ $TERM == 'linux' ]]; then
loadkeys "$CMAP" > /dev/null 2>&1
@ -3313,7 +3324,10 @@ else
done
fi
if [[ ! -f /tmp/welcomed ]]; then
msg "Welcome to the $DIST Installer" "$_welcome"
touch /tmp/welcomed
fi
if ! select_keymap; then
clear