diff options
Diffstat (limited to 'core-services')
-rw-r--r-- | core-services/08-sysctl.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/core-services/08-sysctl.sh b/core-services/08-sysctl.sh index 37d7b9f..3df5c5a 100644 --- a/core-services/08-sysctl.sh +++ b/core-services/08-sysctl.sh @@ -2,15 +2,19 @@ if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then msg "Loading sysctl(8) settings..." + mkdir -p /run/vsysctl.d for i in /run/sysctl.d/*.conf \ /etc/sysctl.d/*.conf \ /usr/local/lib/sysctl.d/*.conf \ - /usr/lib/sysctl.d/*.conf \ - /etc/sysctl.conf; do + /usr/lib/sysctl.d/*.conf; do - if [ -e "$i" ]; then - printf '* Applying %s ...\n' "$i" - sysctl -p "$i" + if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then + ln -s "$i" "/run/vsysctl.d/${i##*/}" fi done + for i in /run/vsysctl.d/*.conf; do + sysctl -p "$i" + done + rm -rf -- /run/vsysctl.d + sysctl -p /etc/sysctl.conf fi |