mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-01-09 20:02:31 +01:00
move sysctl from \*rc functions to etc/sysctl.p/
This commit is contained in:
parent
9d5721899e
commit
3b976e3cd4
16
etc/sysctl.d/60-mikaela.conf
Normal file
16
etc/sysctl.d/60-mikaela.conf
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Kernel settings that I prefer to have. ~~ Mikaela
|
||||||
|
|
||||||
|
# Core files appear with filename <binary>-<PID>-<hostname>.core
|
||||||
|
kernel.core_pattern = %e-%p-%h.core
|
||||||
|
|
||||||
|
# Only use swap when you have to, ~99% of RAM in use
|
||||||
|
vm.swappiness = 1
|
||||||
|
|
||||||
|
# When binding to IPv6, only bind to IPv6. Avoids dotted-decimals
|
||||||
|
net.ipv6.bindv6only=1
|
||||||
|
|
||||||
|
## Enable IPv6 privacy extensions and prefer them to the SLAAC address
|
||||||
|
net.ipv6.conf.eno1.use_tempaddr=2
|
||||||
|
net.ipv6.conf.wlo1.use_tempaddr=2
|
||||||
|
net.ipv6.conf.eth0.use_tempaddr=2
|
||||||
|
net.ipv6.conf.wlan0.use_tempaddr=2
|
30
rc/bashrc
30
rc/bashrc
@ -470,9 +470,6 @@ alias apty="apt -y"
|
|||||||
alias apt-gety="apt-get -y "
|
alias apt-gety="apt-get -y "
|
||||||
alias aptitudey="aptitude -y "
|
alias aptitudey="aptitude -y "
|
||||||
|
|
||||||
# Set core pattern how I want it to be
|
|
||||||
alias fcorepattern='echo kernel.core_pattern = %e-%p-%h.core >> /etc/sysctl.conf;sysctl -f'
|
|
||||||
|
|
||||||
# ffmpeg is depreceated
|
# ffmpeg is depreceated
|
||||||
alias ffmpeg=avconv
|
alias ffmpeg=avconv
|
||||||
|
|
||||||
@ -835,33 +832,6 @@ if hash clang++ 2>/dev/null; then
|
|||||||
export CXX=clang++
|
export CXX=clang++
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Function to temporarily set sysctl options which I want
|
|
||||||
function sysctl-mikaela() {
|
|
||||||
set -x
|
|
||||||
sysctl kernel.core_pattern=%e-%p-%h.core
|
|
||||||
sysctl vm.swappiness=1
|
|
||||||
sysctl net.ipv6.bindv6only=1
|
|
||||||
sysctl net.ipv6.conf.eth0.use_tempaddr=2
|
|
||||||
sysctl net.ipv6.conf.wlan0.use_tempaddr=2
|
|
||||||
echo 'If network-manager is used, see /etc/NetworkManager/system-connections/<connection>'
|
|
||||||
set +x
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to permanently set sysctl options which I want.
|
|
||||||
function sysctl-mikaela-run() {
|
|
||||||
set -x
|
|
||||||
mkdir -p /etc/sysctl.d/
|
|
||||||
echo kernel.core_pattern = %e-%p-%h.core > /etc/sysctl.d/60-mikaela.conf
|
|
||||||
echo vm.swappiness = 1 >> /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 --system
|
|
||||||
service procps start
|
|
||||||
echo 'If network-manager is used, see /etc/NetworkManager/system-connections/<connection>'
|
|
||||||
set +x
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add GitHub pull requests to fetched things via http://git.io/-C-0oQ
|
# Add GitHub pull requests to fetched things via http://git.io/-C-0oQ
|
||||||
github-add-pulls() {
|
github-add-pulls() {
|
||||||
git config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*'
|
git config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*'
|
||||||
|
30
rc/zshrc
30
rc/zshrc
@ -450,9 +450,6 @@ alias apt-gety="apt-get -y "
|
|||||||
alias aptitudey="aptitude -y "
|
alias aptitudey="aptitude -y "
|
||||||
alias apty="apt -y"
|
alias apty="apt -y"
|
||||||
|
|
||||||
# Set core pattern how I want it to be
|
|
||||||
alias fcorepattern='echo kernel.core_pattern = %e-%p-%h.core >> /etc/sysctl.conf;sysctl -f'
|
|
||||||
|
|
||||||
# ffmpeg is depreceated
|
# ffmpeg is depreceated
|
||||||
alias ffmpeg=avconv
|
alias ffmpeg=avconv
|
||||||
|
|
||||||
@ -818,33 +815,6 @@ if hash clang++ 2>/dev/null; then
|
|||||||
export CXX=clang++
|
export CXX=clang++
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Function to temporarily set sysctl options which I want
|
|
||||||
function sysctl-mikaela() {
|
|
||||||
set -x
|
|
||||||
sysctl kernel.core_pattern=%e-%p-%h.core
|
|
||||||
sysctl vm.swappiness=1
|
|
||||||
sysctl net.ipv6.bindv6only=1
|
|
||||||
sysctl net.ipv6.conf.eth0.use_tempaddr=2
|
|
||||||
sysctl net.ipv6.conf.wlan0.use_tempaddr=2
|
|
||||||
echo 'If network-manager is used, see /etc/NetworkManager/system-connections/<connection>'
|
|
||||||
set +x
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to permanently set sysctl options which I want.
|
|
||||||
function sysctl-mikaela-run() {
|
|
||||||
set -x
|
|
||||||
mkdir -p /etc/sysctl.d/
|
|
||||||
echo kernel.core_pattern = %e-%p-%h.core > /etc/sysctl.d/60-mikaela.conf
|
|
||||||
echo vm.swappiness = 1 >> /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 --system
|
|
||||||
service procps start
|
|
||||||
echo 'If network-manager is used, see /etc/NetworkManager/system-connections/<connection>'
|
|
||||||
set +x
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add GitHub pull requests to fetched things via http://git.io/-C-0oQ
|
# Add GitHub pull requests to fetched things via http://git.io/-C-0oQ
|
||||||
github-add-pulls() {
|
github-add-pulls() {
|
||||||
git config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*'
|
git config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*'
|
||||||
|
Loading…
Reference in New Issue
Block a user