#!/bin/sh # prerm script for #DRIVERNAME# # # Copyright (C) 2007 Mario Limonciello # Copyright (C) 2009 Canonical Ltd # Authors: Alberto Milone PACKAGE_NAME=#DRIVERNAME# CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2` remove_dkms_module() { echo "Removing all DKMS Modules" dkms remove -m $PACKAGE_NAME -v $CVERSION --all > /dev/null echo "Done." } case "$1" in upgrade) remove_dkms_module ;; remove) remove_dkms_module update-alternatives --remove gl_conf #LDSOCONF# # Trigger gmenu so as to update the gnome menu dpkg-trigger --by-package=$PACKAGE_NAME gmenucache || true # explicit ldconfig due to alternatives ldconfig # Update the grub gfxpayload blacklist if which update-grub-gfxpayload >/dev/null 2>&1; then update-grub-gfxpayload fi ;; esac #DEBHELPER#