#!/bin/sh
set -e

case "$1" in
    remove)
	conffile=/etc/modprobe.d/oss-compat.conf
	# If the installed file matches a known version, remove it
	if [ -f ${conffile} ]; then
	    md5sum=$(md5sum ${conffile} | cut -d\  -f1)
	    # Wheezy version
	    md5wheezy=88222606b0a3ba8b0825c5000c754e6f
	    # Jessie version
	    md5jessie=cb772524a069ec273d7ca6db520388c1
	    if [ "${md5sum}" = "${md5wheezy}" -o "${md5sum}" = "${md5jessie}" ]; then
		rm -f /etc/modprobe.d/oss-compat.conf
	    fi
	fi
	;;
esac

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

#DEBHELPER#

exit 0
