summaryrefslogtreecommitdiff
path: root/games/armagetronad/user_creation.sh
diff options
context:
space:
mode:
authorponce <matteo.bernardini@gmail.com>2010-12-26 11:38:57 -0600
committerNiels Horn <niels.horn@slackbuilds.org>2010-12-27 20:12:23 -0200
commite0dbc16969689f9123dfc9d4b47c0589ee2c8c25 (patch)
tree239318c53d26222848215c2193cd7182258e66f1 /games/armagetronad/user_creation.sh
parent087c1f836298da2c53e26b58461651ec20df2849 (diff)
downloadslackbuilds-e0dbc16969689f9123dfc9d4b47c0589ee2c8c25.tar.gz
games/armagetronad: Added (old school Tron lightcycles openGL game)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'games/armagetronad/user_creation.sh')
-rw-r--r--games/armagetronad/user_creation.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/games/armagetronad/user_creation.sh b/games/armagetronad/user_creation.sh
new file mode 100644
index 0000000000..ddc37f5359
--- /dev/null
+++ b/games/armagetronad/user_creation.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# armagetronad default user to use with Master server creation script.
+
+AUSER=armagetronad
+AUID=244
+AGID=20
+
+if test -w /etc/passwd; then
+ echo "Creating user ${AUSER} with UID:${AUID} GID:${AGID}"
+ if which useradd > /dev/null 2>&1; then
+ useradd -u ${AUID} -g ${AGID} ${AUSER} || echo -e "\nWarning: unable to create user with 'useradd'. Giving up.\n"
+ else
+ echo -e "\nWarning: unable to find suitable program to add user.\n"
+ fi
+
+ else # no write acces to /etc/passwd
+ echo -e "\nWarning: no write access to /etc/passwd, can't add user. Try as root.\n"
+fi