rc: sysctl-mikaela-run: use sysctl.d

This commit is contained in:
Aminda Suomalainen 2015-02-22 11:41:15 +02:00
parent de26949c16
commit 877e8a59cb
2 changed files with 15 additions and 11 deletions

View File

@ -845,12 +845,14 @@ function sysctl-mikaela() {
# Function to permanently set sysctl options which I want.
function sysctl-mikaela-run() {
set -x
echo kernel.core_pattern = %e-%p-%h.core >> /etc/sysctl.conf
echo vm.swappiness = 1 >> /etc/sysctl.conf
echo net.ipv6.bindv6only=1 >> /etc/sysctl.conf
echo net.ipv6.conf.eth0.use_tempaddr=2 >> /etc/sysctl.conf
echo net.ipv6.conf.wlan0.use_tempaddr=2 >> /etc/sysctl.conf
mkdir -p /etc/sysctl.d/
echo kernel.core_pattern = %e-%p-%h.core > /etc/sysctl.d/60-mikaela.conf
echo vm.swappiness = 10 >> /etc/sysctl.d/60-mikaela.conf
echo net.ipv6.bindv6only=1 >> /etc/sysctl.d/60-mikaela.conf
echo net.ipv6.conf.eth0.use_tempaddr=2 >> /etc/sysctl.d/60-mikaela.conf
echo net.ipv6.conf.wlan0.use_tempaddr=2 >> /etc/sysctl.d/60-mikaela.conf
sysctl -p
service procps start
echo 'If network-manager is used, see /etc/NetworkManager/system-connections/<connection>'
set +x
}

View File

@ -823,13 +823,15 @@ function sysctl-mikaela() {
# Function to permanently set sysctl options which I want.
function sysctl-mikaela-run() {
set -x
echo kernel.core_pattern = %e-%p-%h.core >> /etc/sysctl.conf
echo vm.swappiness = 1 >> /etc/sysctl.conf
echo net.ipv6.bindv6only=1 >> /etc/sysctl.conf
echo net.ipv6.conf.eth0.use_tempaddr=2 >> /etc/sysctl.conf
echo net.ipv6.conf.wlan0.use_tempaddr=2 >> /etc/sysctl.conf
echo 'If network-manager is used, see /etc/NetworkManager/system-connections/<connection>'
mkdir -p /etc/sysctl.d/
echo kernel.core_pattern = %e-%p-%h.core > /etc/sysctl.d/60-mikaela.conf
echo vm.swappiness = 10 >> /etc/sysctl.d/60-mikaela.conf
echo net.ipv6.bindv6only=1 >> /etc/sysctl.d/60-mikaela.conf
echo net.ipv6.conf.eth0.use_tempaddr=2 >> /etc/sysctl.d/60-mikaela.conf
echo net.ipv6.conf.wlan0.use_tempaddr=2 >> /etc/sysctl.d/60-mikaela.conf
sysctl -p
service procps start
echo 'If network-manager is used, see /etc/NetworkManager/system-connections/<connection>'
set +x
}