#!/bin/bash

set -e
case "$1" in
	 remove|upgrade)
        find /usr/share/oem-fix-misc-nvidia-lp1845801 -type f | while read f; do
            target=${f/\/usr\/share\/oem-fix-misc-nvidia-lp1845801//etc/modprobe.d}
            [ -f "$target" ] && rm -v "$target"
            dpkg-divert --package oem-fix-misc-nvidia-lp1845801 --rename --remove $target
        done
        if which update-initramfs >/dev/null 2>&1
        then
            update-initramfs -u
        fi
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
