Remove .run installed driver if present on pre-installation

el9
Nicolas Chauvet 11 years ago
parent b2c4a736a7
commit eb20b9b2fe

@ -240,6 +240,12 @@ sed -i -e "s/__USER__/root/" $RPM_BUILD_ROOT%{_unitdir}/nvidia-persistenced.serv
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/nvidia
%pre
if [ "$1" -eq "1" ]; then
if [ -x %{_bindir}/nvidia-uninstall ]; then
%{_bindir}/nvidia-uninstall -s && rm -f %{_bindir}/nvidia-uninstall &>/dev/null || :
fi
fi
%post
if [ "$1" -eq "1" ]; then

Loading…
Cancel
Save