some changes

This commit is contained in:
Patrick McGuire
2021-10-28 14:26:23 -04:00
parent 2338809301
commit a22c0403be
+3 -11
View File
@@ -216,18 +216,8 @@ do_configure_keyboard() {
} }
do_change_locale() { do_change_locale() {
if [ "$INTERACTIVE" = True ]; then
dpkg-reconfigure locales dpkg-reconfigure locales
else ASK_TO_REBOOT=2
local LOCALE="$1"
if ! LOCALE_LINE="$(grep "^$LOCALE " /usr/share/i18n/SUPPORTED)"; then
return 1
fi
local ENCODING="$(echo $LOCALE_LINE | cut -f2 -d " ")"
echo "$LOCALE $ENCODING" > /etc/locale.gen
sed -i "s/^\s*LANG=\S*/LANG=$LOCALE/" /etc/default/locale
dpkg-reconfigure -f noninteractive locales
fi
} }
do_change_timezone() { do_change_timezone() {
@@ -670,6 +660,8 @@ do_finish() {
sync sync
reboot reboot
fi fi
elif [ $ASK_TO_REBOOT -eq 2 ]; then
whiptail --yesno "You must reboot. Do that now?" 20 60 2
fi fi
exit 0 exit 0
} }