#!/bin/bash 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 # Remove the modules once nothing uses them for module in $(egrep '^snd_[^ ]*_oss' /proc/modules | cut -d\ -f1); do (while [ -x /sbin/rmmod -a $(grep ^${module} /proc/modules | cut -d\ -f3) != 0 ]; do sleep 10; done; rmmod ${module}) & disown done ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. exit 0