diff options
author | crees <crees@FreeBSD.org> | 2011-07-03 23:06:00 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2011-07-03 23:06:00 +0800 |
commit | 0054add3bd4b6b9de15bf37d20efdf5e30b1213d (patch) | |
tree | 3e1475574975f4af407c79f341020da5aad608fd /audio | |
parent | 4428229e8770bd5f712eb4660005504197317366 (diff) | |
download | freebsd-ports-gnome-0054add3bd4b6b9de15bf37d20efdf5e30b1213d.tar.gz freebsd-ports-gnome-0054add3bd4b6b9de15bf37d20efdf5e30b1213d.tar.zst freebsd-ports-gnome-0054add3bd4b6b9de15bf37d20efdf5e30b1213d.zip |
- Use USERS and GROUPS
PR: ports/157525
Approved by: rene (mentor)
Diffstat (limited to 'audio')
-rw-r--r-- | audio/linux-shoutcast/Makefile | 3 | ||||
-rw-r--r-- | audio/linux-shoutcast/pkg-install | 50 |
2 files changed, 2 insertions, 51 deletions
diff --git a/audio/linux-shoutcast/Makefile b/audio/linux-shoutcast/Makefile index 721aeeda001e..85e65e56a0ed 100644 --- a/audio/linux-shoutcast/Makefile +++ b/audio/linux-shoutcast/Makefile @@ -21,6 +21,8 @@ ONLY_FOR_ARCHS= i386 amd64 ia64 NO_BUILD= YES RESTRICTED= Redistribution of the software is not allowed +USERS= ${PORTNAME} +GROUPS= ${USERS} USE_RC_SUBR= shoutcast.sh PORTDOCS= README.TXT WRKSRC= ${WRKDIR} @@ -48,7 +50,6 @@ do-install: .endif post-install: - @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${BRANDELF} -t Linux ${PREFIX}/sbin/sc_serv .include <bsd.port.mk> diff --git a/audio/linux-shoutcast/pkg-install b/audio/linux-shoutcast/pkg-install deleted file mode 100644 index 2b6c96b93a64..000000000000 --- a/audio/linux-shoutcast/pkg-install +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -if [ "$2" != "POST-INSTALL" ]; then - exit 0 -fi - -SC_GROUP=shoutcast -SC_USER=shoutcast -SC_SHELL=/bin/sh -SC_HOME=/nonexistent -PW="/usr/sbin/pw" - -if ! ${PW} show group ${SC_GROUP} -q >/dev/null; then - gid=210 - while ${PW} show group -g ${gid} -q >/dev/null; do - gid=`expr ${gid} + 1` - done - if ! ${PW} add group ${SC_GROUP} -g ${gid}; then - e=$? - echo "*** Failed to add group \`${SC_GROUP}'. Please add it manually." - exit ${e} - fi - echo "*** Added group \`${SC_GROUP}' (id ${gid})" -else - gid=`${PW} show group ${SC_GROUP} 2>/dev/null | cut -d: -f3` -fi - -if ! ${PW} show user ${SC_USER} -q >/dev/null; then - uid=210 - while ${PW} show user -u ${uid} -q >/dev/null; do - uid=`expr ${uid} + 1` - done - if ! ${PW} add user ${SC_USER} -u ${uid} -g ${gid} -d "${SC_HOME}" \ - -c "Shoutcast sandbox" -s "${SC_SHELL}" -p "*" \ - ; then - e=$? - echo "*** Failed to add user \`${SC_USER}'. Please add it manually." - exit ${e} - fi - echo "*** Added user \`${SC_USER}' (id ${uid})" -else - if ! ${PW} mod user ${SC_USER} -g ${gid} -d "${SC_HOME}" \ - -c "Shoutcast sandbox" -s "${SC_SHELL}" -p "*" \ - ; then - e=$? - echo "*** Failed to update user \`${SC_USER}'." - exit ${e} - fi - echo "*** Updated user \`${SC_USER}'." -fi |