diff options
author | jlam <jlam> | 1999-09-19 17:05:31 +0000 |
---|---|---|
committer | jlam <jlam> | 1999-09-19 17:05:31 +0000 |
commit | a824d4a1e2cfe2325ed0be460c8dcc9e4872ebb9 (patch) | |
tree | 246c0071119685b8bb286049b842a9613b8353fd /databases | |
parent | be734f8d32fca91866b235af4fb5ae7e700f9cb2 (diff) | |
download | pkgsrc-a824d4a1e2cfe2325ed0be460c8dcc9e4872ebb9.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/REQ | 25 |
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 |