From 509583dc4bb3d517e39e2546c83dcfca877088b8 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 15 Mar 2023 17:42:09 +0000 Subject: [PATCH] base-files: remove obsolte stuff from init.d/sysctl Signed-off-by: Rui Salvaterra --- package/base-files/files/etc/init.d/sysctl | 23 ---------------------- 1 file changed, 23 deletions(-) diff --git a/package/base-files/files/etc/init.d/sysctl b/package/base-files/files/etc/init.d/sysctl index 4db56444c7c6e1..b25db9fab3267d 100755 --- a/package/base-files/files/etc/init.d/sysctl +++ b/package/base-files/files/etc/init.d/sysctl @@ -4,29 +4,6 @@ START=11 apply_defaults() { - local mem="$(awk '/^MemTotal:/ {print $2}' /proc/meminfo)" - local min_free frag_low_thresh frag_high_thresh - - if [ "$mem" -gt 65536 ]; then # 128M - min_free=16384 - elif [ "$mem" -gt 32768 ]; then # 64M - min_free=8192 - else - min_free=1024 - frag_low_thresh=393216 - frag_high_thresh=524288 - fi - - sysctl -qw vm.min_free_kbytes="$min_free" - - [ "$frag_low_thresh" ] && sysctl -qw \ - net.ipv4.ipfrag_low_thresh="$frag_low_thresh" \ - net.ipv4.ipfrag_high_thresh="$frag_high_thresh" \ - net.ipv6.ip6frag_low_thresh="$frag_low_thresh" \ - net.ipv6.ip6frag_high_thresh="$frag_high_thresh" \ - net.netfilter.nf_conntrack_frag6_low_thresh="$frag_low_thresh" \ - net.netfilter.nf_conntrack_frag6_high_thresh="$frag_high_thresh" - # first set default, then all interfaces to avoid races with appearing interfaces if [ -d /proc/sys/net/ipv6/conf ]; then echo 0 > /proc/sys/net/ipv6/conf/default/accept_ra