mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-01-31 18:18:28 +08:00
Update check_kernal.sh
This commit is contained in:
parent
020c052146
commit
a67f1a75b0
1 changed files with 2 additions and 1 deletions
|
@ -22,7 +22,8 @@ check_config(){
|
|||
|
||||
# 检查硬盘大小
|
||||
total_disk=$(df -h / | awk '/\//{print $2}')
|
||||
total_disk_num=$(echo $total_disk | sed 's/G//')
|
||||
total_disk_num=$(echo $total_disk | sed -E 's/([0-9.]+)([GT])/\1 \2/')
|
||||
total_disk_num=$(awk '{printf "%.0f", $1 * ($2 == "T" ? 1024 : 1)}' <<< "$total_disk_num")
|
||||
if [ "$total_disk_num" -lt 20 ]; then
|
||||
_red "本机配置不满足最低要求:至少20G硬盘"
|
||||
_red "本机硬盘配置无法安装PVE"
|
||||
|
|
Loading…
Reference in a new issue