From c65ac7c0eb3e1ba582ae333d023f907301e03d38 Mon Sep 17 00:00:00 2001 From: Ed Swarthout Date: Fri, 5 Dec 2025 10:33:40 -0600 Subject: [PATCH] Fix trigger of CDI refresh service Commit 1f5ce738fcc2 ("Fix trigger of CDI refresh service") did not allow for compressed modules with suffixes such as .zst or .gz. This change relaxes the matching to not require that the kernel module (including extension) be followed by a colon. This allows compressed kernel modules to also be matched. Also fix systemd warning: /etc/systemd/system/nvidia-cdi-refresh.service:26: Ignoring unknown escape sequences: "/(nvidia|nvidia-current)\.ko[:]" Signed-off-by: Ed Swarthout Signed-off-by: Evan Lezar (cherry picked from commit 9911880bf78f89ecb99f9da529a6985e71e718f9) --- deployments/systemd/nvidia-cdi-refresh.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/systemd/nvidia-cdi-refresh.service b/deployments/systemd/nvidia-cdi-refresh.service index 2764d5a2c..2a6f8a01f 100644 --- a/deployments/systemd/nvidia-cdi-refresh.service +++ b/deployments/systemd/nvidia-cdi-refresh.service @@ -23,7 +23,7 @@ Type=oneshot # Values from Environment will be replaced if defined in EnvironmentFile Environment=NVIDIA_CTK_CDI_OUTPUT_FILE_PATH=/var/run/cdi/nvidia.yaml EnvironmentFile=-/etc/nvidia-container-toolkit/nvidia-cdi-refresh.env -ExecCondition=/usr/bin/grep -qE '/(nvidia|nvidia-current)\.ko[:]' /lib/modules/%v/modules.dep +ExecCondition=/usr/bin/grep -qE '/(nvidia|nvidia-current)\\.ko' /lib/modules/%v/modules.dep ExecStart=/usr/bin/nvidia-ctk cdi generate CapabilityBoundingSet=CAP_SYS_MODULE CAP_SYS_ADMIN CAP_MKNOD