baslama-betik-duzenleme

This commit is contained in:
milisbir 2018-09-22 06:27:57 +03:00
parent 7722560532
commit 46678ba262
2 changed files with 63 additions and 5 deletions

View File

@ -18,7 +18,7 @@ case ${1} in
do_start_console || exit 1
do_start_sysctl || exit 1
bolumleri_bagla || exit 1
log_info_msg "klavye ayarlari eklendi..."
yerel_ayar || exit 1
klavye_ayar || exit 1
;;
stop)

View File

@ -1388,8 +1388,15 @@ bolumleri_bagla()
################################################################################
klavye_ayar()
{
#turkce klavye
loadkeys trq
log_info_msg "Setting Keyboard...."
local KLAVYE
KLAVYE="`cat /proc/cmdline | tr " " "\n" | grep -E "^KEYBOARD=.*" | cut -d'=' -f2`"
# Klavye tanımlı değilse öntanımlı Türkçe Q
if [ -z $KLAVYE ];then
KLAVYE=trq
fi
loadkeys $KLAVYE
[ "$?" = "0" ] && log_success_msg "" || log_failure_msg ""
}
################################################################################
# yerel_ayar() #
@ -1399,8 +1406,59 @@ klavye_ayar()
################################################################################
yerel_ayar()
{
export LC_ALL="tr_TR.UTF-8"
export LANG="tr_TR.UTF-8"
log_info_msg "Setting Locale...."
local DIL
DIL="`cat /proc/cmdline | tr " " "\n" | grep -E "^LANGUAGE=.*" | cut -d'=' -f2`"
if [ -z $DIL ];then
if [ ! -f /etc/environment ];then
touch /etc/environment
# Dil tanımlı değilse öntanımlı Türkçe
echo "LANGUAGE="\""tr_TR.UTF-8"\""" >> /etc/environment
echo "LANG="\""tr_TR.UTF-8"\""" >> /etc/environment
echo "LC_NUMERIC="\""tr_TR.UTF-8"\""" >> /etc/environment
echo "LC_TIME="\""tr_TR.UTF-8"\""" >> /etc/environment
echo "LC_MONETARY="\""tr_TR.UTF-8"\""" >> /etc/environment
echo "LC_PAPER="\""tr_TR.UTF-8"\""" >> /etc/environment
echo "LC_IDENTIFICATION="\""tr_TR.UTF-8"\""" >> /etc/environment
echo "LC_NAME="\""tr_TR.UTF-8"\""" >> /etc/environment
echo "LC_ADDRESS="\""tr_TR.UTF-8"\""" >> /etc/environment
echo "LC_TELEPHONE="\""tr_TR.UTF-8"\""" >> /etc/environment
echo "LC_MEASUREMENT="\""tr_TR.UTF-8"\""" >> /etc/environment
echo "BROWSER=/usr/bin/firefox" >> /etc/environment
echo "EDITOR=nano" >> /etc/environment
fi
if [ ! -f /etc/locale.conf ];then
touch /etc/locale.conf
# Dil tanımlı değilse öntanımlı Türkçe
echo "LC_ALL="\""tr_TR.UTF-8"\""" >> /etc/locale.conf
echo "LANG="\""tr_TR.UTF-8"\""" >> /etc/locale.conf
echo "LANGUAGE="\""tr_TR.UTF-8"\""" >> /etc/locale.conf
fi
else
[ -f /etc/environment ] && mv /etc/environment /etc/environment.old
[ -f /etc/locale.conf ] && mv /etc/locale.conf /etc/locale.conf.old
echo "LANGUAGE="\""$DIL"\""" >> /etc/environment
echo "LANG="\""$DIL"\""" >> /etc/environment
echo "LC_NUMERIC="\""$DIL"\""" >> /etc/environment
echo "LC_TIME="\""$DIL"\""" >> /etc/environment
echo "LC_MONETARY="\""$DIL"\""" >> /etc/environment
echo "LC_PAPER="\""$DIL"\""" >> /etc/environment
echo "LC_IDENTIFICATION="\""$DIL"\""" >> /etc/environment
echo "LC_NAME="\""$DIL"\""" >> /etc/environment
echo "LC_ADDRESS="\""$DIL"\""" >> /etc/environment
echo "LC_TELEPHONE="\""$DIL"\""" >> /etc/environment
echo "LC_MEASUREMENT="\""$DIL"\""" >> /etc/environment
echo "BROWSER=/usr/bin/firefox" >> /etc/environment
echo "EDITOR=nano" >> /etc/environment
echo "LC_ALL="\""$DIL"\""" >> /etc/locale.conf
echo "LANG="\""$DIL"\""" >> /etc/locale.conf
echo "LANGUAGE="\""$DIL"\""" >> /etc/locale.conf
fi
[ "$?" = "0" ] && log_success_msg "" || log_failure_msg ""
}
################################################################################
# do_start_network() #