mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
75f8cfb6ea
* Cleanup validatecluster printout * remove deprecated kubectl exec format * Implement CreateLocalCluster function * Update testing documentation Signed-off-by: Derek Nola <derek.nola@suse.com>
22 lines
569 B
Bash
22 lines
569 B
Bash
#!/bin/bash
|
|
ip4_addr=$1
|
|
ip6_addr=$2
|
|
os=$3
|
|
|
|
sysctl -w net.ipv6.conf.all.disable_ipv6=0
|
|
sysctl -w net.ipv6.conf.eth1.accept_dad=0
|
|
sysctl -w net.ipv6.conf.eth1.accept_ra=0
|
|
sysctl -w net.ipv6.conf.eth1.forwarding=0
|
|
|
|
if [ -z "${os##*ubuntu*}" ]; then
|
|
netplan set ethernets.eth1.accept-ra=false
|
|
netplan set ethernets.eth1.addresses=["$ip4_addr"/24,"$ip6_addr"/64]
|
|
netplan apply
|
|
elif [ -z "${os##*alpine*}" ]; then
|
|
iplink set eth1 down
|
|
iplink set eth1 up
|
|
ip -6 addr add "$ip6_addr"/64 dev eth1
|
|
else
|
|
ip -6 addr add "$ip6_addr"/64 dev eth1
|
|
fi
|
|
ip addr show dev eth1 |