-
-
Notifications
You must be signed in to change notification settings - Fork 378
Expand file tree
/
Copy pathsysctl
More file actions
25 lines (18 loc) · 509 Bytes
/
sysctl
File metadata and controls
25 lines (18 loc) · 509 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function f_sysctl {
if [[ $LXC == "1" ]]; then
return
fi
echo "[$SCRIPT_COUNT] $SYSCTL"
cp "$SYSCTL_CONF" "$SYSCTL"
sed -i '/net.ipv6.conf.eth0.accept_ra_rtr_pref/d' "$SYSCTL"
for n in $($ARPBIN -n -a | awk '{print $NF}' | sort | uniq); do
echo "net.ipv6.conf.$n.accept_ra_rtr_pref = 0" >> "$SYSCTL"
done
chmod 0600 "$SYSCTL"
systemctl restart systemd-sysctl
if [[ $VERBOSE == "Y" ]]; then
systemctl status systemd-sysctl --no-pager
echo
fi
((SCRIPT_COUNT++))
}