summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorveego <veego@pkgsrc.org>2001-08-12 19:55:56 +0000
committerveego <veego@pkgsrc.org>2001-08-12 19:55:56 +0000
commite109514d03382b6df2cfb36a40a096c32a8aaf47 (patch)
tree8a80fc1a77c2a4fa8e361c3097efc2b0979d3c0b /databases
parent0127d541871484a38d4b78a4a7cd01be1a8c44dd (diff)
downloadpkgsrc-e109514d03382b6df2cfb36a40a096c32a8aaf47.tar.gz
Fix same problems with the user check:
- use 'id' instead of 'finger'. this is not a real problem, but it is enough and fixing the next problem makes it possible to use it. - grep -q doesn't work on solaris, so use a different way to suppress the output from the user check. - the return code check for the user was reversed.
Diffstat (limited to 'databases')
-rw-r--r--databases/postgresql-server/pkg/INSTALL10
1 files changed, 5 insertions, 5 deletions
diff --git a/databases/postgresql-server/pkg/INSTALL b/databases/postgresql-server/pkg/INSTALL
index 69999e38152..8762131b5f2 100644
--- a/databases/postgresql-server/pkg/INSTALL
+++ b/databases/postgresql-server/pkg/INSTALL
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: INSTALL,v 1.3 2001/05/18 06:13:55 jlam Exp $
+# $NetBSD: INSTALL,v 1.4 2001/08/12 19:55:56 veego Exp $
PKGNAME=$1
STAGE=$2
@@ -37,11 +37,13 @@ PRE-INSTALL)
fi
${RM} -f "/tmp/grouptest.$$"
- # Use `finger' to be able to use NIS.
+ # Use `id' to be able to use NIS.
#
- finger ${USER} 2>&1 | ${GREP} -q "no such user"
+ id ${USER} 2>/dev/null >/dev/null
if [ $? -eq 0 ]
then
+ echo "User '${USER}' already exists...proceeding."
+ else
echo "Creating '${USER}' user..."
${ADDUSER} \
-c "PostgreSQL database administrator" \
@@ -51,8 +53,6 @@ PRE-INSTALL)
${USER}
${RM} -f ${PGHOME}/.profile
echo "Done."
- else
- echo "User '${USER}' already exists...proceeding."
fi
${MKDIR} ${PGHOME}
${CHOWN} -R ${USER}:${GROUP} ${PGHOME}