Skip to content

Commit c644599

Browse files
committed
Configure: fixed nobody/nogroup detection stderr redirection.
Previously, "grep: /etc/group: No such file or directory" errors were printed on systems without the /etc/group file along with the configure output. Fix is to use correct stderr redirection.
1 parent 6afd081 commit c644599

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

auto/unix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ NGX_USER=${NGX_USER:-nobody}
77

88
if [ -z "$NGX_GROUP" ]; then
99
if [ $NGX_USER = nobody ]; then
10-
if grep nobody /etc/group 2>&1 >/dev/null; then
10+
if grep nobody /etc/group >/dev/null 2>&1; then
1111
echo "checking for nobody group ... found"
1212
NGX_GROUP=nobody
1313
else
1414
echo "checking for nobody group ... not found"
1515

16-
if grep nogroup /etc/group 2>&1 >/dev/null; then
16+
if grep nogroup /etc/group >/dev/null 2>&1; then
1717
echo "checking for nogroup group ... found"
1818
NGX_GROUP=nogroup
1919
else

0 commit comments

Comments
 (0)