mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-27 07:54:19 +00:00
Correctly reload files from /etc/sysctl.d/*
This commit is contained in:
parent
d5e7465dbf
commit
12fcc9e057
@ -454,7 +454,7 @@ mapcount_once() {
|
||||
# Sets vm.max_map_count to persist between reboots
|
||||
mapcount_persist() {
|
||||
if [ -d "/etc/sysctl.d" ]; then
|
||||
pkexec sh -c 'echo "vm.max_map_count = 16777216" >> /etc/sysctl.d/20-max_map_count.conf && sysctl -p'
|
||||
pkexec sh -c 'echo "vm.max_map_count = 16777216" >> /etc/sysctl.d/20-max_map_count.conf && sysctl --system'
|
||||
else
|
||||
pkexec sh -c 'echo "vm.max_map_count = 16777216" >> /etc/sysctl.conf && sysctl -p'
|
||||
fi
|
||||
@ -465,7 +465,7 @@ mapcount_persist() {
|
||||
mapcount_manual() {
|
||||
if [ -d "/etc/sysctl.d" ]; then
|
||||
# Newer versions of sysctl
|
||||
message info "To change the setting (a kernel parameter) until next boot, run:\n\nsudo sh -c 'sysctl -w vm.max_map_count=16777216'\n\n\nTo persist the setting between reboots, run:\n\nsudo sh -c 'echo \"vm.max_map_count = 16777216\" >> /etc/sysctl.d/20-max_map_count.conf && sysctl -p'"
|
||||
message info "To change the setting (a kernel parameter) until next boot, run:\n\nsudo sh -c 'sysctl -w vm.max_map_count=16777216'\n\n\nTo persist the setting between reboots, run:\n\nsudo sh -c 'echo \"vm.max_map_count = 16777216\" >> /etc/sysctl.d/20-max_map_count.conf && sysctl --system'"
|
||||
else
|
||||
# Older versions of sysctl
|
||||
message info "To change the setting (a kernel parameter) until next boot, run:\n\nsudo sh -c 'sysctl -w vm.max_map_count=16777216'\n\n\nTo persist the setting between reboots, run:\n\nsudo sh -c 'echo \"vm.max_map_count = 16777216\" >> /etc/sysctl.conf && sysctl -p'"
|
||||
|
Loading…
Reference in New Issue
Block a user