summaryrefslogtreecommitdiff
path: root/games/atitd/pkg-install
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>2003-07-18 13:49:36 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>2003-07-18 13:49:36 +0000
commit947131db942771665bee22e3b28970c99924f740 (patch)
treed3d2fa81446a5bdd82a944bda4aa7b46e5e3e635 /games/atitd/pkg-install
parentVerify GnuPG signature if possible. (diff)
The Linux client for "A Tale in the Desert".
This is a Massively Multiplayer Online Roleplaying Game (MMORPG) MMORPG. The download and first 24 hours of trial gameplay are free. http://www.atitd.com/ for more info.
Notes
Notes: svn path=/head/; revision=85134
Diffstat (limited to 'games/atitd/pkg-install')
-rw-r--r--games/atitd/pkg-install45
1 files changed, 45 insertions, 0 deletions
diff --git a/games/atitd/pkg-install b/games/atitd/pkg-install
new file mode 100644
index 000000000000..418a4fc2a220
--- /dev/null
+++ b/games/atitd/pkg-install
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+PATH=/bin:/usr/sbin
+
+if [ -n "${PACKAGE_BUILDING}" ]; then
+ exit 0
+fi
+
+case $2 in
+PRE-INSTALL)
+ PW=/usr/sbin/pw
+ USER=atitd
+ GROUP=atitd
+ GECOS="A Tale in the Desert"
+
+ echo -n "Checking for group '$GROUP'... "
+
+ if ! ${PW} groupshow $GROUP >/dev/null 2>&1; then
+ echo -n "doesn't exist, adding... "
+ if ${PW} groupadd $GROUP ; then
+ echo "success."
+ else
+ echo "FAILED!"
+ exit 1
+ fi
+ else
+ echo "exists."
+ fi
+
+ echo -n "Checking for user '$USER'... "
+
+ if ! ${PW} usershow $USER >/dev/null 2>&1; then
+ echo -n "doesn't exist, adding... "
+ if ${PW} useradd $USER -c "${GECOS}" -d /nonexistent -g $GROUP -s /sbin/nologin -h - ; then
+ echo "success."
+ else
+ echo "FAILED!"
+ exit 1
+ fi
+ else
+ echo "exists."
+ fi
+
+ ;;
+esac