1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-27 10:03:20 +00:00
freebsd-ports/audio/pulseaudio/pkg-install
Joe Marcus Clarke 4ba786e49d * Update to 0.9.5
* Respect PTHREAD_{CFLAGS,LIBS}
* Make sure pulse-dependent applications are linked against PTHREAD_LIBS [1]
* Add missing pulse and pulse-access user and groups

Reported by:	Romain Tartiere <romain@blogreen.org> [1]
2007-04-30 00:20:33 +00:00

64 lines
1.4 KiB
Bash

#!/bin/sh
case $2 in
POST-INSTALL)
RGROUP=realtime
SUSER=pulse
SGROUP=${SUSER}
AGROUP=pulse-access
SUID=563
RGID=557
SGID=${SUID}
AGID=564
PW=/usr/sbin/pw
if ${PW} group show "${RGROUP}" 2>/dev/null; then
echo "You already have a group \"${RGROUP}\", so I will use it."
else
if ${PW} groupadd ${RGROUP} -g ${RGID}; then
echo "Added group \"${RGROUP}\"."
else
echo "Adding group \"${RGROUP}\" failed..."
exit 1
fi
fi
if ${PW} group show "${SGROUP}" 2>/dev/null; then
echo "You already have a group \"${SGROUP}\", so I will use it."
else
if ${PW} groupadd ${SGROUP} -g ${SGID}; then
echo "Added group \"${SGROUP}\"."
else
echo "Adding group \"${SGROUP}\" failed..."
exit 1
fi
fi
if ${PW} group show "${AGROUP}" 2>/dev/null; then
echo "You already have a group \"${AGROUP}\", so I will use it."
else
if ${PW} groupadd ${AGROUP} -g ${AGID}; then
echo "Added group \"${AGROUP}\"."
else
echo "Adding group \"${AGROUP}\" failed..."
exit 1
fi
fi
if ${PW} user show "${SUSER}" 2>/dev/null; then
echo "You already have a user \"${SUSER}\", so I will use it."
else
if ${PW} useradd ${SUSER} -u ${SUID} -g ${SGROUP} -h - \
-d "/nonexistent" -s /sbin/nologin -c "PulseAudio System User"
then
echo "Added user \"${SUSER}\"."
else
echo "Adding user \"${SUSER}\" failed..."
exit 1
fi
fi
exit 0
;;
esac