2
# postrm script for bumblebee-nvidia
4
# see: dh_installdeb(1)
9
purge|remove|abort-install)
10
# Ubuntu and Debian's packaging of nvidia's proprietary driver differ greatly
11
# Also, do not rely solely on dpkg-vendor (see LP: #1061769)
12
if (which dpkg-vendor >/dev/null && dpkg-vendor --derives-from Ubuntu) || \
13
[ -e /etc/dpkg/origins/ubuntu ]; then
15
# == Ubuntu specific section ==
16
# Restore the alternatives in case bumblebee is installed on a
17
# non-Optimus system that requires the nvidia driver
18
for arch in x86_64-linux-gnu i386-linux-gnu; do
19
update-alternatives --force --auto ${arch}_gl_conf 2>/dev/null || true
22
# versions before Oneiric without multiarch
23
update-alternatives --force --auto gl_conf 2>/dev/null || true
27
# == Debian specific section ==
28
# Restore the alternatives in case bumblebee is installed on a
29
# non-Optimus system that requires the nvidia driver
30
update-alternatives --force --auto glx 2>/dev/null || true
36
upgrade|failed-upgrade|abort-upgrade|disappear)
39
echo "postrm called with unknown argument \`$1'" >&2