Skip to content

Commit dd67605

Browse files
[no-relnote] fix(systemd): Support alternative nvidia-smi path in refresh service
The nvidia-cdi-refresh.service unit hardcodes the path to nvidia-smi as /usr/bin/nvidia-smi. On RPM-based distributions, this binary is often located at /usr/sbin/nvidia-smi. This change modifies the systemd service file to check for the existence of nvidia-smi in both /usr/bin and /usr/sbin. By using the '|' prefix on the ConditionPathExists directives, we ensure that the condition is met if either path exists, making the service compatible across both DEB and RPM-based systems. Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
1 parent 375bfaa commit dd67605

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

deployments/systemd/nvidia-cdi-refresh.service

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
[Unit]
1616
Description=Refresh NVIDIA CDI specification file
17-
ConditionPathExists=/usr/bin/nvidia-smi
17+
ConditionPathExists=|/usr/bin/nvidia-smi
18+
ConditionPathExists=|/usr/sbin/nvidia-smi
1819
ConditionPathExists=/usr/bin/nvidia-ctk
1920

2021
[Service]

0 commit comments

Comments
 (0)