Skip to content

Commit b915e99

Browse files
committed
[no-relnote] cleanup /etc/cdi/nvidia.yaml on uninstall
Signed-off-by: Pat Riehecky <[email protected]>
1 parent 35babbe commit b915e99

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
case "$1" in
6+
purge)
7+
/bin/rm -f /etc/cdi/nvidia.yaml
8+
;;
9+
10+
upgrade|failed-upgrade|remove|abort-install|abort-upgrade|disappear)
11+
;;
12+
13+
*)
14+
echo "postrm called with unknown argument \`$1'" >&2
15+
exit 1
16+
;;
17+
esac
18+
19+
#DEBHELPER#
20+
21+
exit 0

packaging/debian/nvidia-container-toolkit.postrm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ NVIDIA_CONTAINER_RUNTIME_HOOK=/usr/bin/nvidia-container-runtime-hook
66
NVIDIA_CONTAINER_TOOLKIT=/usr/bin/nvidia-container-toolkit
77

88
case "$1" in
9-
purge)
9+
purge|remove)
1010
[ -L "${NVIDIA_CONTAINER_TOOLKIT}" ] && rm ${NVIDIA_CONTAINER_TOOLKIT}
1111
;;
1212

13-
upgrade|failed-upgrade|remove|abort-install|abort-upgrade|disappear)
13+
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
1414
;;
1515

1616
*)

packaging/rpm/SPECS/nvidia-container-toolkit.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ Provides tools such as the NVIDIA Container Runtime and NVIDIA Container Toolkit
105105
%{_bindir}/nvidia-cdi-hook
106106
%{_sysconfdir}/systemd/system/nvidia-cdi-refresh.service
107107
%{_sysconfdir}/systemd/system/nvidia-cdi-refresh.path
108+
%config(noreplace) %ghost %{_sysconfdir}/cdi/nvidia.yaml
108109

109110
# The OPERATOR EXTENSIONS package consists of components that are required to enable GPU support in Kubernetes.
110111
# This package is not distributed as part of the NVIDIA Container Toolkit RPMs.

0 commit comments

Comments
 (0)