mirror of
https://github.com/aclist/dztui.git
synced 2025-04-09 14:02:59 +02:00
Compare commits
2 commits
66eb4cf6d4
...
8d648060c1
Author | SHA1 | Date | |
---|---|---|---|
8d648060c1 | |||
c73120295a |
1 changed files with 4 additions and 3 deletions
7
dzgui.sh
7
dzgui.sh
|
@ -406,14 +406,15 @@ check_architecture(){
|
||||||
}
|
}
|
||||||
check_map_count(){
|
check_map_count(){
|
||||||
[[ $is_steam_deck -gt 0 ]] && return 0
|
[[ $is_steam_deck -gt 0 ]] && return 0
|
||||||
|
local map_count_file="/proc/sys/vm/max_map_count"
|
||||||
local min_count=1048576
|
local min_count=1048576
|
||||||
local conf_file="/etc/sysctl.d/dayz.conf"
|
local conf_file="/etc/sysctl.d/dayz.conf"
|
||||||
local current_count
|
local current_count
|
||||||
if [[ ! -f /proc/sys/vm/max_map_count ]]; then
|
if [[ ! -f ${map_count_file} ]]; then
|
||||||
logger WARN "File \`/proc/sys/vm/max_map_count\` desn't exist!"
|
logger WARN "File '${map_count_file}' doesn't exist!"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
current_count=$(cat /proc/sys/vm/max_map_count)
|
current_count=$(cat ${map_count_file})
|
||||||
if [[ $current_count -ge $min_count ]]; then
|
if [[ $current_count -ge $min_count ]]; then
|
||||||
logger DEBUG "System map count is set to ${current_count}"
|
logger DEBUG "System map count is set to ${current_count}"
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in a new issue