08-sysctl.sh (557B)
1 # vim: set ts=4 sw=4 et: 2 3 if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then 4 msg "Loading sysctl(8) settings..." 5 mkdir -p /run/vsysctl.d 6 for i in /run/sysctl.d/*.conf \ 7 /etc/sysctl.d/*.conf \ 8 /usr/local/lib/sysctl.d/*.conf \ 9 /usr/lib/sysctl.d/*.conf; do 10 11 if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then 12 ln -s "$i" "/run/vsysctl.d/${i##*/}" 13 fi 14 done 15 for i in /run/vsysctl.d/*.conf; do 16 sysctl -p "$i" 17 done 18 rm -rf -- /run/vsysctl.d 19 sysctl -p /etc/sysctl.conf 20 fi