| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
# Source debconf library. |
| 6 |
. /usr/share/debconf/confmodule |
| 7 |
|
| 8 |
CONFIG_FILE=/etc/security/limits.d/audio.conf |
| 9 |
|
| 10 |
# if neither $CONFIG_FILE nor ${CONFIG_FILE}.disabled exists, |
| 11 |
# let's copy it over from /usr/share/ |
| 12 |
if [ ! -s ${CONFIG_FILE} ] && [ ! -s ${CONFIG_FILE}.disabled ]; then |
| 13 |
cp /usr/share/jackd/audio.conf ${CONFIG_FILE}.disabled |
| 14 |
fi |
| 15 |
|
| 16 |
db_get jackd/tweak_rt_limits |
| 17 |
if [ "x$RET" = "xtrue" ]; then |
| 18 |
if [ -e ${CONFIG_FILE}.disabled ]; then |
| 19 |
mv ${CONFIG_FILE}.disabled ${CONFIG_FILE} || true |
| 20 |
fi |
| 21 |
else |
| 22 |
# user doesn't want RT prio |
| 23 |
if [ -e $CONFIG_FILE ]; then |
| 24 |
mv $CONFIG_FILE ${CONFIG_FILE}.disabled || true |
| 25 |
fi |
| 26 |
fi |
| 27 |
|
| 28 |
#DEBHELPER# |