aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-05-29 11:21:14 +0800
committerpeter <peter@FreeBSD.org>1997-05-29 11:21:14 +0800
commit291d1795539c57a14677d1c5576057b30625163a (patch)
tree005f15db0f1f5d8f90016352e282771e272920a6 /net
parentf363fea518bfd60fd253fcfd53d601e3806e89fa (diff)
downloadfreebsd-ports-gnome-291d1795539c57a14677d1c5576057b30625163a.tar.gz
freebsd-ports-gnome-291d1795539c57a14677d1c5576057b30625163a.tar.zst
freebsd-ports-gnome-291d1795539c57a14677d1c5576057b30625163a.zip
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')
-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}\"."