Update setup-kubetools.sh
Current sed line breaks /etc/fstab as it puts the '#' between '/' and "swap". Instead, match the fstype field ("swap" surrounded by spaces) and prepend a '#' to the beginning of the line if it does not already start with one (idempotent ;) ).
This commit is contained in:
parent
6ff42c3fad
commit
414cf806a7
@ -33,7 +33,7 @@ EOF
|
|||||||
sudo apt-mark hold kubelet kubeadm kubectl
|
sudo apt-mark hold kubelet kubeadm kubectl
|
||||||
swapoff -a
|
swapoff -a
|
||||||
|
|
||||||
sed -i 's/swap/#swap/' /etc/fstab
|
sed -r -i 's/^([^#].*[[:space:]]swap[[:space:]].*)$/#\1/' /etc/fstab
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set iptables bridging
|
# Set iptables bridging
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user