mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Merge pull request #10637 from marun/conditional-f21-fixup
Vagrant: Make F21 fixup conditional
This commit is contained in:
commit
68a916d1b1
@ -21,6 +21,7 @@ set -e
|
||||
# See: https://github.com/mitchellh/vagrant/issues/2430
|
||||
hostnamectl set-hostname ${MASTER_NAME}
|
||||
|
||||
if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=21 ]]; then
|
||||
# Workaround to vagrant inability to guess interface naming sequence
|
||||
# Tell system to abandon the new naming scheme and use eth* instead
|
||||
rm -f /etc/sysconfig/network-scripts/ifcfg-enp0s3
|
||||
@ -30,6 +31,7 @@ NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
|
||||
grep -q ^NM_CONTROLLED= ${NETWORK_CONF_PATH}ifcfg-eth1 || echo 'NM_CONTROLLED=no' >> ${NETWORK_CONF_PATH}ifcfg-eth1
|
||||
sed -i 's/^#NM_CONTROLLED=.*/NM_CONTROLLED=no/' ${NETWORK_CONF_PATH}ifcfg-eth1
|
||||
systemctl restart network
|
||||
fi
|
||||
|
||||
function release_not_found() {
|
||||
echo "It looks as if you don't have a compiled version of Kubernetes. If you" >&2
|
||||
|
@ -72,6 +72,7 @@ EOF
|
||||
# See: https://github.com/mitchellh/vagrant/issues/2430
|
||||
hostnamectl set-hostname ${MINION_NAME}
|
||||
|
||||
if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=21 ]]; then
|
||||
# Workaround to vagrant inability to guess interface naming sequence
|
||||
# Tell system to abandon the new naming scheme and use eth* instead
|
||||
rm -f /etc/sysconfig/network-scripts/ifcfg-enp0s3
|
||||
@ -81,6 +82,7 @@ NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
|
||||
grep -q ^NM_CONTROLLED= ${NETWORK_CONF_PATH}ifcfg-eth1 || echo 'NM_CONTROLLED=no' >> ${NETWORK_CONF_PATH}ifcfg-eth1
|
||||
sed -i 's/^#NM_CONTROLLED=.*/NM_CONTROLLED=no/' ${NETWORK_CONF_PATH}ifcfg-eth1
|
||||
systemctl restart network
|
||||
fi
|
||||
|
||||
# Setup hosts file to support ping by hostname to master
|
||||
if [ ! "$(cat /etc/hosts | grep $MASTER_NAME)" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user