summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorErnie Hershey <ernie.hershey@10gen.com>2013-10-12 16:58:50 -0400
committerErnie Hershey <ernie.hershey@10gen.com>2013-10-12 18:20:02 -0400
commit732c43fd8786fed550b033f47372a9225f9d047c (patch)
tree3aa256acf53831daa77c4ee1731971b8dfb6eaa4 /debian
parent96effe4d13852215eabcdb1eb33bd72cb285624d (diff)
downloadmongo-732c43fd8786fed550b033f47372a9225f9d047c.tar.gz
SERVER-7883 use getent to check user existence
Diffstat (limited to 'debian')
-rw-r--r--debian/mongodb-enterprise-unstable-server.postinst2
-rw-r--r--debian/mongodb-org-unstable-server.postinst2
2 files changed, 2 insertions, 2 deletions
diff --git a/debian/mongodb-enterprise-unstable-server.postinst b/debian/mongodb-enterprise-unstable-server.postinst
index b9700a1232f..2914fb85631 100644
--- a/debian/mongodb-enterprise-unstable-server.postinst
+++ b/debian/mongodb-enterprise-unstable-server.postinst
@@ -21,7 +21,7 @@ set -e
case "$1" in
configure)
# create a mongodb group and user
- if ! grep -q mongodb /etc/passwd; then
+ if ! getent passwd mongodb >/dev/null 2>&1; then
adduser --system --no-create-home mongodb
addgroup --system mongodb
adduser mongodb mongodb
diff --git a/debian/mongodb-org-unstable-server.postinst b/debian/mongodb-org-unstable-server.postinst
index b9700a1232f..2914fb85631 100644
--- a/debian/mongodb-org-unstable-server.postinst
+++ b/debian/mongodb-org-unstable-server.postinst
@@ -21,7 +21,7 @@ set -e
case "$1" in
configure)
# create a mongodb group and user
- if ! grep -q mongodb /etc/passwd; then
+ if ! getent passwd mongodb >/dev/null 2>&1; then
adduser --system --no-create-home mongodb
addgroup --system mongodb
adduser mongodb mongodb