#!/bin/bash # postinst script for llx-qjack-pulse-integrator # # see: dh_installdeb(1) #set -e #set -x # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see https://www.debian.org/doc/debian-policy/ or # the debian-policy package # Source debconf library. . /usr/share/debconf/confmodule package=llx-qjack-pulse-integrator override_jackd_debconf(){ # JACKD COPY POSTINST CONFIG_FILE=/etc/security/limits.d/audio.conf # if neither $CONFIG_FILE nor ${CONFIG_FILE}.disabled exists, # let's copy it over from /usr/share/ if [ ! -s ${CONFIG_FILE} ] && [ ! -s ${CONFIG_FILE}.disabled ]; then cp /usr/share/jackd/audio.conf ${CONFIG_FILE}.disabled fi # OVERRIDE SETTING db_set jackd/tweak_rt_limits $tweak # CONTINUED COPY POSTINST db_get jackd/tweak_rt_limits if [ "x$RET" = "xtrue" ]; then if [ -e ${CONFIG_FILE}.disabled ]; then mv ${CONFIG_FILE}.disabled ${CONFIG_FILE} || true fi else # user doesn't want RT prio if [ -e $CONFIG_FILE ]; then mv $CONFIG_FILE ${CONFIG_FILE}.disabled || true fi fi # END JACKD COPY POSTINST } divert_default_pa(){ if test -f /etc/pulse/default.pa then dpkg-divert --package $package --divert /etc/pulse/default.pa.pulseaudio-orig --rename /etc/pulse/default.pa fi [ \! -e /etc/pulse/default.pa -o -L /etc/pulse/default.pa ] && ln -f /etc/pulse/default.pa.$package /etc/pulse/default.pa } case "$1" in configure) tweak="true" ;; abort-upgrade|abort-remove|abort-deconfigure) tweak="false" ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac divert_default_pa override_jackd_debconf # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0