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 61 62 63 64
|
#!/bin/sh -e
package=alsa-base
case "$1" in
configure)
. /usr/share/debconf/confmodule
db_version 2.0
if [ -f /etc/alsa/$package.conf ]; then
db_get $package/start_oss_layer
start_oss_layer=$RET
db_get $package/force_stop_alsa_before_suspend
force_stop_modules_before_suspend=$RET
sed -e "s/startosslayer=.*/startosslayer=$start_oss_layer/" \
-e "s/force_stop_modules_before_suspend=.*/force_stop_modules_before_suspend=$force_stop_modules_before_suspend/" \
/etc/alsa/$package.conf > /etc/alsa/$package.conf.tmp
mv /etc/alsa/$package.conf.tmp /etc/alsa/$package.conf
fi
if [ -f /etc/modutils/alsa ] && [ ! -L /etc/modutils/alsa ]; then
if [ -n "$2" ]; then
alsa_version=`echo $2 | head -c 3`
else
db_get $package/what_version_is_your_config
alsa_version="$RET"
fi
db_subst $package/move_config_to_new_location ver $alsa_version
db_get $package/move_config_to_new_location
if [ "$RET" = "true" ]; then
mv /etc/modutils/alsa /etc/alsa/modutils/$alsa_version
ln -s /etc/alsa/modutils/$alsa_version /etc/modutils/alsa
fi
fi
if dpkg --compare-versions "$2" lt "0.9+0beta10-1"; then
if [ -f "/etc/alsa/modutils/1.0" ] && [ ! -f "/etc/alsa/modutils/0.9" ]; then
echo -n "Copying ALSA 0.9 configuration file from ALSA 1.0... "
cp /etc/alsa/modutils/1.0 /etc/alsa/modutils/0.9
echo "done."
fi
fi
db_stop
[ -x /usr/sbin/update-devfsd ] && /usr/sbin/update-devfsd >&2
;;
abort-upgrade|abort-remove|abort-deconfigure)
exit 0;
;;
*)
echo "postinst called with unknown argument \`$1'" >&2;
exit 0;
;;
esac
#DEBHELPER#
|