home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- set -e
-
- . /usr/share/debconf/confmodule
- db_version 2.0
-
- case "$1" in
- configure|reconfigure)
- if dpkg --compare-versions "$2" lt "1.0.10-4ubuntu2"; then
- # Rename existing symlinks
- if [ -L /etc/modprobe.d/linux-sound-base_noOSS ]; then
- mv /etc/modprobe.d/linux-sound-base_noOSS \
- /etc/modprobe.d/blacklist-oss
- fi
- if [ -L /etc/modprobe.d/linux-sound-base_noALSA ]; then
- mv /etc/modprobe.d/linux-sound-base_noALSA \
- /etc/modprobe.d/blacklist-alsa
- fi
-
- # Remove other symlinks and conffiles
- rm -f /etc/hotplug/blacklist.d/linux-sound-base_noOSS
- rm -f /etc/hotplug/blacklist.d/linux-sound-base_noALSA
- rmdir /etc/hotplug/blacklist.d 2>/dev/null || true
- rmdir /etc/hotplug 2>/dev/null || true
-
- rm -f /etc/discover.d/linux-sound-base_noOSS
- rm -f /etc/discover.d/linux-sound-base_noALSA
- rmdir /etc/discover.d 2>/dev/null || true
-
- rm -f /etc/modutils/linux-sound-base_noOSS
- rm -f /etc/modutils/linux-sound-base_noALSA
- rmdir /etc/modutils 2>/dev/null || true
- fi
-
- db_get linux-sound-base/sound_system || :
- case "$RET" in
- OSS)
- rm -f /etc/modprobe.d/blacklist-oss
- ln -sf /lib/linux-sound-base/noALSA.modprobe.conf \
- /etc/modprobe.d/blacklist-alsa
- ;;
- ALSA|default)
- rm -f /etc/modprobe.d/blacklist-alsa
- ln -sf /lib/linux-sound-base/noOSS.modprobe.conf \
- /etc/modprobe.d/blacklist-oss
- ;;
- 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
-
-
-
- db_stop || :
-