aboutsummaryrefslogtreecommitdiff
path: root/databases/msql3/pkg-install
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-10-21 18:41:45 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-10-21 18:41:45 +0000
commit9b39f177c54974311c6fadcca196ec54625968b9 (patch)
tree388cd753f28c0bfe21151160996f8d86c8e16821 /databases/msql3/pkg-install
parent5a4433e41d686f191f450f807e7cd55a44e96684 (diff)
downloadports-9b39f177c54974311c6fadcca196ec54625968b9.tar.gz
ports-9b39f177c54974311c6fadcca196ec54625968b9.zip
Upgrade to 2.0.12
Notes
Notes: svn path=/head/; revision=49032
Diffstat (limited to 'databases/msql3/pkg-install')
-rw-r--r--databases/msql3/pkg-install34
1 files changed, 34 insertions, 0 deletions
diff --git a/databases/msql3/pkg-install b/databases/msql3/pkg-install
new file mode 100644
index 000000000000..f140382da510
--- /dev/null
+++ b/databases/msql3/pkg-install
@@ -0,0 +1,34 @@
+#!/bin/sh
+# $FreeBSD$
+#
+
+if [ "$2" != "PRE-INSTALL" ]; then
+ exit 0
+fi
+
+USER=msql
+GROUP=${USER}
+UID=87
+GID=${UID}
+
+if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
+ 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 1>&2; then
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -s "/bin/sh" -d "/var/db/msqldb" \
+ -c "mSQL-2 pseudo-user"; \
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+fi
+exit 0