5
2
. /usr/share/debconf/confmodule
9
test -e "$1" || test -L "$1"
12
if [ "$1" = "configure" ]
15
if [ -x "/usr/bin/nvidia-installer" ]
17
db_fset nvidia-common/uninstall-nvidia-installer seen false
18
db_input high nvidia-common/uninstall-nvidia-installer
20
db_get nvidia-common/uninstall-nvidia-installer
21
if [ "$RET" = "true" ]
23
nvidia-installer --uninstall --no-runlevel-check --no-x-check --ui=none || true
24
elif [ ! -x "/usr/bin/nvidia-installer" ]
26
: # the user may have removed it inbetween
28
echo "ERROR: Please run 'nvidia-installer --uninstall' manually or delete it." >&2
33
if exists "/usr/bin/nvidia-installer" || exists "/usr/bin/nvidia-uninstall"
35
db_fset nvidia-common/delete-nvidia-installer seen false
36
db_input high nvidia-common/delete-nvidia-installer
38
db_get nvidia-common/delete-nvidia-installer
39
if [ "$RET" = "true" ]
41
rm -f /usr/bin/nvidia-installer /usr/bin/nvidia-uninstall
43
echo "ERROR: Please run 'nvidia-installer --uninstall' manually or delete it." >&2
4
db_fset nvidia-common/obsolete-driver seen false
5
db_fget nvidia-common/obsolete-driver seen || true
7
if [ "$RET" != "true" ]; then
8
LATEST=$(nvidia-detector | tail -n 1)
9
if [ "${LATEST}" != "none" ]; then
10
db_subst nvidia-common/obsolete-driver latest "$LATEST"
11
db_input high nvidia-common/obsolete-driver || true