diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2003-09-05 22:26:41 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2003-09-05 22:26:41 +0000 |
commit | 87a76f2e41be39694c50a8789e0ead03be059c38 (patch) | |
tree | 975f085efb66bd88192a4d05239ad70a750c3f8a /games/ldmud/pkg-install | |
parent | 369f5b61b27f259ab38e822bb3ac77a0528a32b7 (diff) | |
download | ports-87a76f2e41be39694c50a8789e0ead03be059c38.tar.gz ports-87a76f2e41be39694c50a8789e0ead03be059c38.zip |
Notes
Diffstat (limited to 'games/ldmud/pkg-install')
-rw-r--r-- | games/ldmud/pkg-install | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/games/ldmud/pkg-install b/games/ldmud/pkg-install new file mode 100644 index 000000000000..575cbe714897 --- /dev/null +++ b/games/ldmud/pkg-install @@ -0,0 +1,37 @@ +#!/bin/sh +# $FreeBSD$ + +if [ "$2" = "PRE-INSTALL" ]; then + exit 0 +fi + +PATH=/bin:/sbin:/usr/bin:/usr/sbin + +USER=mud +GROUP=${USER} +UID=97 +GID=${UID} + +if pw groupshow "${GROUP}" 2>/dev/null; then + echo "Using existing group \"${GROUP}\"." +else + if pw groupadd "${GROUP}" -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi +fi + +if pw usershow "${USER}" 2>/dev/null; then + echo "Using existing user \"${USER}\"." +else + if pw useradd "${USER}" -u ${UID} -g "${GROUP}" -h - \ + -s "/bin/sh" -d "/nonexistent" -c "MUD Owner" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi +fi |