Fix messages

This commit is contained in:
the-sane 2021-01-23 22:13:28 -05:00 committed by GitHub
parent 2c6cceb60f
commit 870091faaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -531,10 +531,10 @@ mapcount_once() {
mapcount_set() { mapcount_set() {
if [ -d "/etc/sysctl.d" ]; then if [ -d "/etc/sysctl.d" ]; then
pkexec sh -c 'echo "vm.max_map_count = 16777216" >> /etc/sysctl.d/20-max_map_count.conf && sysctl --system' pkexec sh -c 'echo "vm.max_map_count = 16777216" >> /etc/sysctl.d/20-max_map_count.conf && sysctl --system'
message info "The necessary configuration has been appended to:\n/etc/sysctl.d/20-max_map_count.conf" message info "The vm.max_map_count configuration has been appended to:\n/etc/sysctl.d/20-max_map_count.conf"
else else
pkexec sh -c 'echo "vm.max_map_count = 16777216" >> /etc/sysctl.conf && sysctl -p' pkexec sh -c 'echo "vm.max_map_count = 16777216" >> /etc/sysctl.conf && sysctl -p'
message info "The necessary configuration has been appended to:\n/etc/sysctl.conf" message info "The vm.max_map_count configuration has been appended to:\n/etc/sysctl.conf"
fi fi
mapcount_confirm mapcount_confirm
} }
@ -585,12 +585,12 @@ filelimit_set() {
# Using systemd # Using systemd
# Append to the file # Append to the file
pkexec sh -c 'echo "DefaultLimitNOFILE=524288" >> /etc/systemd/system.conf && systemctl daemon-reexec' pkexec sh -c 'echo "DefaultLimitNOFILE=524288" >> /etc/systemd/system.conf && systemctl daemon-reexec'
message info "Your open files limit configuration has been appended to:\n/etc/systemd/system.conf" message info "The open files limit configuration has been appended to:\n/etc/systemd/system.conf"
elif [ -f "/etc/security/limits.conf" ]; then elif [ -f "/etc/security/limits.conf" ]; then
# Using limits.conf # Using limits.conf
# Insert before the last line in the file # Insert before the last line in the file
pkexec sh -c 'sed -i "\$i* hard nofile 524288" /etc/security/limits.conf' pkexec sh -c 'sed -i "\$i* hard nofile 524288" /etc/security/limits.conf'
message info "Your open files limit configuration has been appended to:\n/etc/security/limits.conf" message info "The open files limit configuration has been appended to:\n/etc/security/limits.conf"
else else
# Don't know what method to use # Don't know what method to use
message warning "This Helper is unable to detect the correct method of setting\nthe open file descriptors limit on your system.\n\nWe recommend manually configuring this limit to at least 524288." message warning "This Helper is unable to detect the correct method of setting\nthe open file descriptors limit on your system.\n\nWe recommend manually configuring this limit to at least 524288."