2
# prerm script for #DRIVERNAME#
4
# Copyright (C) 2007 Mario Limonciello
5
# Copyright (C) 2009 Canonical Ltd
6
# Authors: Alberto Milone
9
PACKAGE_NAME=#DRIVERNAME#
10
CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
11
CVERSION=${CVERSION#*really.}
13
remove_dkms_module() {
14
echo "Removing all DKMS Modules"
15
dkms remove -m $PACKAGE_NAME -v $CVERSION --all > /dev/null
26
update-alternatives --remove #DEB_HOST_MULTIARCH#_gl_conf #LDSOCONF#
27
update-alternatives --remove #OTHER_ARCH#_gl_conf #ALTLDSOCONF#
29
# Trigger gmenu so as to update the gnome menu
30
dpkg-trigger --by-package=$PACKAGE_NAME gmenucache || true
32
# explicit ldconfig due to alternatives
35
# Update the grub gfxpayload blacklist
36
if which update-grub-gfxpayload >/dev/null 2>&1; then
37
update-grub-gfxpayload
40
# Remove any quirks for the driver
41
if [ `which quirks-handler` ]; then
42
quirks-handler -d $PACKAGE_NAME -v