Skip to content

Commit 9911880

Browse files
EdSwarthoutelezar
authored andcommitted
Fix trigger of CDI refresh service
Commit 1f5ce73 ("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 <Ed.Swarthout@gmail.com> Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent df77c43 commit 9911880

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deployments/systemd/nvidia-cdi-refresh.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Type=oneshot
2323
# Values from Environment will be replaced if defined in EnvironmentFile
2424
Environment=NVIDIA_CTK_CDI_OUTPUT_FILE_PATH=/var/run/cdi/nvidia.yaml
2525
EnvironmentFile=-/etc/nvidia-container-toolkit/nvidia-cdi-refresh.env
26-
ExecCondition=/usr/bin/grep -qE '/(nvidia|nvidia-current)\.ko[:]' /lib/modules/%v/modules.dep
26+
ExecCondition=/usr/bin/grep -qE '/(nvidia|nvidia-current)\\.ko' /lib/modules/%v/modules.dep
2727
ExecStart=/usr/bin/nvidia-ctk cdi generate
2828
CapabilityBoundingSet=CAP_SYS_MODULE CAP_SYS_ADMIN CAP_MKNOD
2929

0 commit comments

Comments
 (0)