1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
db_version 2.0
case "$1" in
configure|reconfigure)
db_get linux-sound-base/sound_system || :
case "$RET" in
OSS)
rm -f /etc/hotplug/blacklist.d/linux-sound-base_noOSS
rm -f /etc/discover.d/linux-sound-base_noOSS
rm -f /etc/modutils/linux-sound-base_noOSS
rm -f /etc/modprobe.d/linux-sound-base_noOSS
ln -sf /lib/linux-sound-base/noALSA.hotplug.blacklist /etc/hotplug/blacklist.d/linux-sound-base_noALSA
ln -sf /lib/linux-sound-base/noALSA.discover1.conf /etc/discover.d/linux-sound-base_noALSA
ln -sf /lib/linux-sound-base/noALSA.modutils.conf /etc/modutils/linux-sound-base_noALSA
ln -sf /lib/linux-sound-base/noALSA.modprobe.conf /etc/modprobe.d/linux-sound-base_noALSA
ln -sf /lib/linux-sound-base/OSS.discover2.conf /etc/discover.conf.d/10linux-sound-base
;;
ALSA)
ln -sf /lib/linux-sound-base/noOSS.hotplug.blacklist /etc/hotplug/blacklist.d/linux-sound-base_noOSS
ln -sf /lib/linux-sound-base/noOSS.discover1.conf /etc/discover.d/linux-sound-base_noOSS
ln -sf /lib/linux-sound-base/noOSS.modutils.conf /etc/modutils/linux-sound-base_noOSS
ln -sf /lib/linux-sound-base/noOSS.modprobe.conf /etc/modprobe.d/linux-sound-base_noOSS
rm -f /etc/hotplug/blacklist.d/linux-sound-base_noALSA
rm -f /etc/discover.d/linux-sound-base_noALSA
rm -f /etc/modutils/linux-sound-base_noALSA
rm -f /etc/modprobe.d/linux-sound-base_noALSA
ln -sf /lib/linux-sound-base/ALSA.discover2.conf /etc/discover.conf.d/10linux-sound-base
;;
default)
rm -f /etc/hotplug/blacklist.d/linux-sound-base_noOSS
rm -f /etc/discover.d/linux-sound-base_noOSS
rm -f /etc/modutils/linux-sound-base_noOSS
rm -f /etc/modprobe.d/linux-sound-base_noOSS
rm -f /etc/hotplug/blacklist.d/linux-sound-base_noALSA
rm -f /etc/discover.d/linux-sound-base_noALSA
rm -f /etc/modutils/linux-sound-base_noALSA
rm -f /etc/modprobe.d/linux-sound-base_noALSA
rm -f /etc/discover.conf.d/10linux-sound-base
;;
esac
update-modules
;;
abort-upgrade|abort-remove|abort-deconfigure)
# We don't have to do anything because we didn't do anything in prerm
exit 0
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
db_stop || :
|