summaryrefslogtreecommitdiff
path: root/games/ldmud/pkg-install
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2003-09-05 22:26:41 +0000
committerGreg Lewis <glewis@FreeBSD.org>2003-09-05 22:26:41 +0000
commit87a76f2e41be39694c50a8789e0ead03be059c38 (patch)
tree975f085efb66bd88192a4d05239ad70a750c3f8a /games/ldmud/pkg-install
parent. Add (optional) support for the DGD networking package. (diff)
. Add a port of the LDMud driver (with optional 2.4.5 mudlib).
"LDMud started as a project to clean up and modernize Amylaar's LPMud gamedriver. Primary goals are full documentation, a commented source body and out-of-the-box support for the major mudlibs, of which the commented source body has been pretty much completed. During the course of work a lot of bug fixes and improvements found their way into the driver - much more than originally expected, and definitely enough to make LDMud a driver in its own right."
Notes
Notes: svn path=/head/; revision=88608
Diffstat (limited to 'games/ldmud/pkg-install')
-rw-r--r--games/ldmud/pkg-install37
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