bjh 99/04/28 19:13:11
Modified: . configure
Log:
Prevent grep error messages on systems with no /etc/passwd
Revision Changes Path
1.88 +14 -12 apache-1.3/configure
Index: configure
===================================================================
RCS file: /home/cvs/apache-1.3/configure,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- configure 1999/04/28 08:01:41 1.87
+++ configure 1999/04/29 02:13:09 1.88
@@ -1057,18 +1057,20 @@
conf_serveradmin="[EMAIL PROTECTED]"
conf_servername="new.host.name"
if [ "x$confadjust" = "x1" ]; then
- for uid in nobody www daemon demon http httpd; do
- if [ "x`egrep \^${uid}: /etc/passwd`" != "x" ]; then
- conf_user="$uid"
- break
- fi
- done
- for gid in nobody nogroup www daemon demon http httpd; do
- if [ "x`egrep \^${gid}: /etc/group`" != "x" ]; then
- conf_group="$gid"
- break
- fi
- done
+ if [ -f /etc/passwd ]; then
+ for uid in nobody www daemon demon http httpd; do
+ if [ "x`egrep \^${uid}: /etc/passwd`" != "x" ]; then
+ conf_user="$uid"
+ break
+ fi
+ done
+ for gid in nobody nogroup www daemon demon http httpd; do
+ if [ "x`egrep \^${gid}: /etc/group`" != "x" ]; then
+ conf_group="$gid"
+ break
+ fi
+ done
+ fi
if [ "x`$aux/getuid.sh`" != "x0" ]; then
conf_port="8080"
fi