mirror of
https://github.com/oneclickvirt/pve.git
synced 2024-11-15 20:50:55 +08:00
Update check_kernal.sh
This commit is contained in:
parent
2a9fba1748
commit
78ebcfd912
1 changed files with 7 additions and 8 deletions
|
@ -7,17 +7,16 @@ _green() { echo -e "\033[32m\033[01m$@\033[0m"; }
|
|||
_yellow() { echo -e "\033[33m\033[01m$@\033[0m"; }
|
||||
_blue() { echo -e "\033[36m\033[01m$@\033[0m"; }
|
||||
reading(){ read -rp "$(_green "$1")" "$2"; }
|
||||
if [[ -d "/usr/share/locale/en_US.UTF-8" ]]; then
|
||||
export LANG=en_US.UTF-8
|
||||
export LC_ALL=en_US.UTF-8
|
||||
export LANGUAGE=en_US.UTF-8
|
||||
utf8_locale=$(locale -a 2>/dev/null | grep -i -m 1 -E "utf8|UTF-8")
|
||||
if [[ -z "$utf8_locale" ]]; then
|
||||
_yellow "No UTF-8 locale found"
|
||||
else
|
||||
export LANG=C.UTF-8
|
||||
export LC_ALL=C.UTF-8
|
||||
export LANGUAGE=C.UTF-8
|
||||
export LC_ALL="$utf8_locale"
|
||||
export LANG="$utf8_locale"
|
||||
export LANGUAGE="$utf8_locale"
|
||||
_green "Locale set to $utf8_locale"
|
||||
fi
|
||||
|
||||
|
||||
# 检查CPU是否支持硬件虚拟化
|
||||
if [ "$(egrep -c '(vmx|svm)' /proc/cpuinfo)" -eq 0 ]; then
|
||||
_yellow "CPU不支持硬件虚拟化,无法嵌套虚拟化KVM服务器,但可以开LXC服务器(CT)"
|
||||
|
|
Loading…
Reference in a new issue