# HG changeset patch # User Maxim Dounin <mdou...@mdounin.ru> # Date 1748209461 -10800 # Mon May 26 00:44:21 2025 +0300 # Node ID 03f5c84e7e8c05ce16f6f36452e4cb818c85dde6 # Parent e2a6fefd81dbe201a88876a95f34620df87259a2 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. diff --git a/auto/unix b/auto/unix --- a/auto/unix +++ b/auto/unix @@ -7,13 +7,13 @@ NGX_USER=${NGX_USER:-nobody} if [ -z "$NGX_GROUP" ]; then if [ $NGX_USER = nobody ]; then - if grep nobody /etc/group 2>&1 >/dev/null; then + if grep nobody /etc/group >/dev/null 2>&1; then echo "checking for nobody group ... found" NGX_GROUP=nobody else echo "checking for nobody group ... not found" - if grep nogroup /etc/group 2>&1 >/dev/null; then + if grep nogroup /etc/group >/dev/null 2>&1; then echo "checking for nogroup group ... found" NGX_GROUP=nogroup else