summaryrefslogtreecommitdiff
path: root/net/cvsup-mirror
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1997-05-29 03:21:14 +0000
committerPeter Wemm <peter@FreeBSD.org>1997-05-29 03:21:14 +0000
commit6ef4ce131f687aa5143fc3d25f30370a70d9f068 (patch)
tree0ad326da46b69f698ee132072a040a366507dfaa /net/cvsup-mirror
parentDistfile moved on master site. (diff)
Don't grep /etc/passwd and /etc/group for checking the existance of
users since it doesn't see yp/nis. Use 'pw {user|group} show ...' and check the return code, otherwise the script can try and add an already existing user or group.
Diffstat (limited to 'net/cvsup-mirror')
-rw-r--r--net/cvsup-mirror/pkg-install4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/cvsup-mirror/pkg-install b/net/cvsup-mirror/pkg-install
index 53f97b7f98d6..fc96e3c0fb7c 100644
--- a/net/cvsup-mirror/pkg-install
+++ b/net/cvsup-mirror/pkg-install
@@ -94,7 +94,7 @@ EOF
fi
echo ""
- if grep -q "^${group}:" /etc/group; then
+ if pw group show "${group}" 2>/dev/null; then
echo "You already have a group \"${group}\", so I will use it."
else
echo "You need a group \"${group}\"."
@@ -111,7 +111,7 @@ EOF
fi
fi
- if grep -q "^${user}:" /etc/passwd; then
+ if pw user show "${user}" 2>/dev/null; then
echo "You already have a user \"${user}\", so I will use it."
else
echo "You need a user \"${user}\"."