This commit is contained in:
CanbiZ
2025-05-08 10:00:32 +02:00
parent fd88e608ba
commit 0ebcbde79a
2 changed files with 17 additions and 7 deletions

View File

@@ -64,13 +64,13 @@ error_handler() {
# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection
setting_up_container() {
msg_info "Setting up Container OS"
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1)
echo "LANG=${locale_line}" >/etc/default/locale
locale-gen >/dev/null
export LANG=${locale_line}
echo $tz >/etc/timezone
ln -sf /usr/share/zoneinfo/$tz /etc/localtime
#sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
#locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1)
#echo "LANG=${locale_line}" >/etc/default/locale
#locale-gen >/dev/null
#export LANG=${locale_line}
#echo $tz >/etc/timezone
#ln -sf /usr/share/zoneinfo/$tz /etc/localtime
for ((i = RETRY_NUM; i > 0; i--)); do
if [ "$(hostname -I)" != "" ]; then
break