summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorjlam <jlam>1999-09-19 17:05:31 +0000
committerjlam <jlam>1999-09-19 17:05:31 +0000
commit1b1a6550011b670d9a1d635e04d2f472c9da6e28 (patch)
tree246c0071119685b8bb286049b842a9613b8353fd /databases
parent7f412e6094c749cfa152bc1fd0e96fea3d1fb67a (diff)
downloadpkgsrc-1b1a6550011b670d9a1d635e04d2f472c9da6e28.tar.gz
Apply fix suggested in PR#7445 to check for existence of group before
adding PostgreSQL user to the group. Closes PR#7445.
Diffstat (limited to 'databases')
-rw-r--r--databases/postgresql/pkg/REQ25
1 files changed, 13 insertions, 12 deletions
diff --git a/databases/postgresql/pkg/REQ b/databases/postgresql/pkg/REQ
index 9a84fb135d5..0dd141061b5 100644
--- a/databases/postgresql/pkg/REQ
+++ b/databases/postgresql/pkg/REQ
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: REQ,v 1.2 1999/09/19 04:24:56 jlam Exp $
+# $NetBSD: REQ,v 1.3 1999/09/19 17:05:31 jlam Exp $
PGUSER=@PGUSER@
PGGROUP=@PGGROUP@
@@ -17,6 +17,18 @@ then
fi
+# Group... the default's shipped with NetBSD
+# We need to check that ${PGGROUP} exists before adding the user with
+# addnerd.
+#
+if grep "^${PGGROUP}:" /etc/group 2>&1 >/dev/null
+then
+ echo "Group '$PGGROUP' already exists, proceeding."
+else
+ echo "Please add group '$PGGROUP' to /etc/group before installing."
+ exit 1
+fi
+
# use finger to be able to use NIS, ...
if finger ${PGUSER} 2>&1 | grep >/dev/null "no such user"
then
@@ -26,14 +38,3 @@ then
else
echo "User '$PGUSER' already exists, proceeding."
fi
-
-
-# Group... the default's shipped with NetBSD
-#
-if grep "^${PGGROUP}:" /etc/group 2>&1 >/dev/null
-then
- echo "Group '$PGGROUP' already exists, proceeding."
-else
- echo "Please add group '$PGGROUP' to /etc/group, then restart."
- exit 1
-fi