From af9eea751b7d89bb0f4f5cc08be110437bc298d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Wed, 21 Aug 2024 16:27:09 +0200 Subject: [PATCH] pre-install: Fix service name for cri-o runtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the cri-o runtime uses "crio.service" service name (tested on OCP 4.14) Related to: #418 Signed-off-by: Lukáš Doktor --- install/pre-install-payload/scripts/reqs-deploy.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install/pre-install-payload/scripts/reqs-deploy.sh b/install/pre-install-payload/scripts/reqs-deploy.sh index 8ae05f00..a497f49d 100755 --- a/install/pre-install-payload/scripts/reqs-deploy.sh +++ b/install/pre-install-payload/scripts/reqs-deploy.sh @@ -167,8 +167,13 @@ function uninstall_artifacts() { function restart_systemd_service() { host_systemctl daemon-reload - echo "Restarting ${container_engine}" - host_systemctl restart "${container_engine}" + if [ "${container_engine}" == "cri-o" ]; then + service_name="crio" + else + service_name="${container_engine}" + fi + echo "Restarting ${service_name}" + host_systemctl restart "${service_name}" } function configure_nydus_snapshotter_for_containerd() {