From b92dd0e5ed1917a3022a550cfcc01dcef3ba29dc Mon Sep 17 00:00:00 2001 From: Ganesh Maharaj Mahalingam Date: Sun, 17 Feb 2019 01:40:27 -0800 Subject: [PATCH] Check crio.conf before copying Signed-off-by: Ganesh Maharaj Mahalingam --- clr-k8s-examples/setup_kata_firecracker.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clr-k8s-examples/setup_kata_firecracker.sh b/clr-k8s-examples/setup_kata_firecracker.sh index 5d6063d..1ec8dca 100755 --- a/clr-k8s-examples/setup_kata_firecracker.sh +++ b/clr-k8s-examples/setup_kata_firecracker.sh @@ -74,7 +74,9 @@ sudo chmod +x /usr/bin/kata-fc # Also setup crio to use devicemapper sudo mkdir -p /etc/crio/ -sudo cp /usr/share/defaults/crio/crio.conf /etc/crio/crio.conf +if [ ! -f /etc/crio/crio.conf ]; then + sudo cp /usr/share/defaults/crio/crio.conf /etc/crio/crio.conf +fi echo -e "\n[crio.runtime.runtimes.kata-qemu]\nruntime_path = \"/usr/bin/kata-runtime\"" | sudo tee -a /etc/crio/crio.conf echo -e "\n[crio.runtime.runtimes.kata-fc]\nruntime_path = \"/usr/bin/kata-fc\"" | sudo tee -a /etc/crio/crio.conf