aboutsummaryrefslogtreecommitdiff
path: root/audio/pulseaudio/pkg-install
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2007-04-30 00:20:33 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2007-04-30 00:20:33 +0000
commit4ba786e49ded8d06cd62b603daf9951de5f88f1d (patch)
tree0afb3cbc4ed858872348db51faa9c5ce2be96a82 /audio/pulseaudio/pkg-install
parent6c461f0c454bab5e1aee5ef97ec1a8acacbf533f (diff)
downloadports-4ba786e49ded8d06cd62b603daf9951de5f88f1d.tar.gz
ports-4ba786e49ded8d06cd62b603daf9951de5f88f1d.zip
Notes
Diffstat (limited to 'audio/pulseaudio/pkg-install')
-rw-r--r--audio/pulseaudio/pkg-install55
1 files changed, 48 insertions, 7 deletions
diff --git a/audio/pulseaudio/pkg-install b/audio/pulseaudio/pkg-install
index f4d1fb1121fe..7460a0eab52d 100644
--- a/audio/pulseaudio/pkg-install
+++ b/audio/pulseaudio/pkg-install
@@ -2,21 +2,62 @@
case $2 in
POST-INSTALL)
- GROUP=realtime
- GID=557
+ 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 "${GROUP}" 2>/dev/null; then
- echo "You already have a group \"${GROUP}\", so I will use it."
+ 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 ${GROUP} -g ${GID}; then
- echo "Added group \"${GROUP}\"."
+ if ${PW} groupadd ${RGROUP} -g ${RGID}; then
+ echo "Added group \"${RGROUP}\"."
else
- echo "Adding group \"${GROUP}\" failed..."
+ 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