aboutsummaryrefslogtreecommitdiff
path: root/sysutils/sge60/pkg-install
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2004-02-01 06:40:53 +0000
committerMaho Nakata <maho@FreeBSD.org>2004-02-01 06:40:53 +0000
commit9d68495d5af85e136617c0833b39b927894b1434 (patch)
tree0eb8a8b76b2d4b54a0df2eb8a1fa879aa87556bf /sysutils/sge60/pkg-install
parent1446f53647400eb281b80cb534d36c798d841333 (diff)
downloadports-9d68495d5af85e136617c0833b39b927894b1434.tar.gz
ports-9d68495d5af85e136617c0833b39b927894b1434.zip
Notes
Diffstat (limited to 'sysutils/sge60/pkg-install')
-rw-r--r--sysutils/sge60/pkg-install34
1 files changed, 34 insertions, 0 deletions
diff --git a/sysutils/sge60/pkg-install b/sysutils/sge60/pkg-install
new file mode 100644
index 000000000000..d1df38d64006
--- /dev/null
+++ b/sysutils/sge60/pkg-install
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+u=sgeadmin
+g=sgeadmin
+ugid=96
+homedir=/nonexistent
+shell=/sbin/nologin
+comment="Sun Grid Engine Admin"
+
+case $2 in
+PRE-INSTALL)
+ if pw group show "${g}" >/dev/null 2>&1; then
+ echo "Using existing group \"${g}\"."
+ else
+ echo "Creating group \"${g}\", (gid: ${ugid})."
+ pw groupadd ${g} -g ${ugid}
+ if [ $? != 0 ]; then
+ echo "Failed to add group \"${g}\"."
+ exit 1
+ fi
+ fi
+ if pw user show "${u}" >/dev/null 2>&1; then
+ echo "Using existing user \"${u}\"."
+ else
+ echo "Creating user \"${u}\", (uid: ${ugid})."
+ pw useradd ${u} -u ${ugid} -g ${ugid} -h - \
+ -d ${homedir} -s ${shell} -c "${comment}"
+ if [ $? != 0 ]; then
+ echo "Failed to add user \"${u}\"."
+ exit 1
+ fi
+ fi
+ ;;
+esac