blob: af0b1f6b71194227f81df262bd8f0bf95c44ce91 [file] [log] [blame]
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#!/bin/sh
set -e
PKG=cros-pulse-config
CROS_PULSE_CONFIG_DIR=/usr/share/cros-pulse-config
PULSEAUDIO_CONFIG_DIR=/etc/pulse
case "$1" in
configure)
for file in daemon.conf default.pa; do
dpkg-divert --package ${PKG} \
--divert ${PULSEAUDIO_CONFIG_DIR}/${file}.distrib \
--rename ${PULSEAUDIO_CONFIG_DIR}/${file}
ln -sf ${CROS_PULSE_CONFIG_DIR}/${file} ${PULSEAUDIO_CONFIG_DIR}
done
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0