Skip to content

Commit

Permalink
base-files: remove obsolte stuff from init.d/sysctl
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Salvaterra <[email protected]>
  • Loading branch information
rsalvaterra committed Apr 7, 2024
1 parent 018a7e7 commit 38895f3
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions package/base-files/files/etc/init.d/sysctl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 38895f3

Please sign in to comment.