mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
parent
a45aa86b7d
commit
6408fa85f1
@ -1730,6 +1730,12 @@ check_ram() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# 用于兜底,不太准确
|
||||
if [ -z $ram_size ]; then
|
||||
ram_size=$(free -m | grep ^Mem: | awk '{print $2}')
|
||||
ram_size=$((ram_size + 64 + 4))
|
||||
fi
|
||||
|
||||
if [ -z $ram_size ] || [ $ram_size -le 0 ]; then
|
||||
error_and_exit "Could not detect RAM size."
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user