mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-30 21:04:20 +00:00
Improve messages
This commit is contained in:
parent
1840983431
commit
478ff37b8a
@ -546,8 +546,9 @@ mapcount_set() {
|
|||||||
|
|
||||||
# Check vm.max_map_count for the correct setting
|
# Check vm.max_map_count for the correct setting
|
||||||
mapcount_check() {
|
mapcount_check() {
|
||||||
|
mapcount="$(cat /proc/sys/vm/max_map_count)"
|
||||||
# Add to the results and actions arrays
|
# Add to the results and actions arrays
|
||||||
if [ "$(cat /proc/sys/vm/max_map_count)" -ge 16777216 ]; then
|
if [ "$mapcount" -ge 16777216 ]; then
|
||||||
# All good
|
# All good
|
||||||
preflight_pass+=("vm.max_map_count is set to at least 16777216.")
|
preflight_pass+=("vm.max_map_count is set to at least 16777216.")
|
||||||
elif grep -E -x -q "vm.max_map_count" /etc/sysctl.conf /etc/sysctl.d/* 2>/dev/null; then
|
elif grep -E -x -q "vm.max_map_count" /etc/sysctl.conf /etc/sysctl.d/* 2>/dev/null; then
|
||||||
@ -560,7 +561,7 @@ mapcount_check() {
|
|||||||
preflight_manual+=("To change vm.max_map_count until the next reboot, run:\nsudo sysctl -w vm.max_map_count=16777216")
|
preflight_manual+=("To change vm.max_map_count until the next reboot, run:\nsudo sysctl -w vm.max_map_count=16777216")
|
||||||
else
|
else
|
||||||
# The setting should be changed
|
# The setting should be changed
|
||||||
preflight_fail+=("vm.max_map_count should be set to at least 16777216\nto give the game access to more than 8GB of memory\nand avoid crashes in areas with lots of geometry.")
|
preflight_fail+=("vm.max_map_count is $mapcount\nand should be set to at least 16777216\nto give the game access to sufficient memory.")
|
||||||
# Add the function that will be called to change the configuration
|
# Add the function that will be called to change the configuration
|
||||||
preflight_action_funcs+=("mapcount_set")
|
preflight_action_funcs+=("mapcount_set")
|
||||||
|
|
||||||
@ -617,7 +618,7 @@ filelimit_check() {
|
|||||||
preflight_pass+=("Hard open file descriptors limit is set to at least 524288.")
|
preflight_pass+=("Hard open file descriptors limit is set to at least 524288.")
|
||||||
else
|
else
|
||||||
# The file limit should be changed
|
# The file limit should be changed
|
||||||
preflight_fail+=("Your hard open file descriptors limit should be set\nto at least 524288.")
|
preflight_fail+=("Your hard open file descriptors limit is $filelimit\nand should be set to at least 524288\nto increase the maximum number of open files.")
|
||||||
# Add the function that will be called to change the configuration
|
# Add the function that will be called to change the configuration
|
||||||
preflight_action_funcs+=("filelimit_set")
|
preflight_action_funcs+=("filelimit_set")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user