From 3fcfc96d20d09408e0d512d1a08e44d112cae35f Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Wed, 12 Jun 1996 09:02:59 +0000 Subject: [PATCH] fix test for yp in resolv.conf --- src/etc/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/rc b/src/etc/rc index cc7f11d5..06e0f0f8 100644 --- a/src/etc/rc +++ b/src/etc/rc @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.14 1996/06/11 03:25:10 tholo Exp $ +# $OpenBSD: rc,v 1.15 1996/06/12 09:02:59 deraadt Exp $ # System startup script run by init on autoboot # or after single-user. @@ -103,7 +103,7 @@ if [ -d /var/yp/binding ]; then # if we are the master server, run rpc.yppasswdd _host1=`ypwhich -m passwd 2> /dev/null` _host2=`hostname` - if grep '^lookup' /etc/resolv.conf | grep yp | wc; then + if [ `grep '^lookup' /etc/resolv.conf | grep yp | wc -c` -ne 0 ]; then _host1=`ypmatch $_host1 hosts | cut -d' ' -f2` _host2=`ypmatch $_host2 hosts | cut -d' ' -f2 | head -1` else