From de1bb68d1928b2e3501c60f13effb7ee8eb20af1 Mon Sep 17 00:00:00 2001 From: Claudius Volz Date: Mon, 27 Feb 2023 00:45:21 +0100 Subject: [PATCH] nvidia-container-toolkit.spec: fix syntax error in postun scriptlet Signed-off-by: Claudius Volz --- packaging/rpm/SPECS/nvidia-container-toolkit.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packaging/rpm/SPECS/nvidia-container-toolkit.spec b/packaging/rpm/SPECS/nvidia-container-toolkit.spec index a4ea15bf..ed44bc37 100644 --- a/packaging/rpm/SPECS/nvidia-container-toolkit.spec +++ b/packaging/rpm/SPECS/nvidia-container-toolkit.spec @@ -69,7 +69,9 @@ rm -rf %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit ln -sf %{_bindir}/nvidia-container-runtime-hook %{_bindir}/nvidia-container-toolkit %postun -if [ -L %{_bindir}/nvidia-container-toolkit ] then; rm -f %{_bindir}/nvidia-container-toolkit; fi +if [ "$1" = 0 ]; then # package is uninstalled, not upgraded + if [ -L %{_bindir}/nvidia-container-toolkit ]; then rm -f %{_bindir}/nvidia-container-toolkit; fi +fi %files %license LICENSE