Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Sep 1998 10:32:32 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        dag-erli@ifi.uio.no (Dag-Erling C. Sm rgrav )
Cc:        Studded <Studded@dal.net>, Drew Derbyshire <ahd@kew.com>, freebsd-bugs@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG
Subject:   Re: conf/8031: /etc/rc looks for /etc/sendmail.cf at startup 
Message-ID:  <199809240932.KAA04923@woof.lan.awfulhak.org>
In-Reply-To: Your message of "23 Sep 1998 21:20:15 %2B0200." <xzpvhmed4b4.fsf@hrotti.ifi.uio.no> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Studded <Studded@dal.net> writes:
> > 	This isn't directed towards Drew, but technically the RHS of the test
> > should be "XYES" instead of how it is now. The '=' conditional compares
> > strings, so the LHS is correct, and it should be the same on both sides.
> > [...]
> > >  ! if [ "X${sendmail_enable}" = X"YES" ]; then
> > >         echo -n ' sendmail';    /usr/sbin/sendmail ${sendmail_flags}
> > >    fi
> 
> The X is totally unnecessary as long as you have quotes around the
> variable to make sure you get an empty string (rather than a missing
> argument) if it's undefined or empty.
[.....]

Not if someone's set (say) ``sendmail_enable=-x'' ;-)  The only 
unnecessary bits are the {} around the variable and the quotes around 
the YES, but the quotes make it clearer that the X isn't *really* part 
of the comparison.

> DES
> -- 
> Dag-Erling Smørgrav - dag-erli@ifi.uio.no

-- 
Brian <brian@Awfulhak.org>, <brian@FreeBSD.org>, <brian@OpenBSD.org>
      <http://www.Awfulhak.org>;
Don't _EVER_ lose your sense of humour....



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809240932.KAA04923>