From owner-freebsd-bugs Thu Sep 24 10:30:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA07022 for freebsd-bugs-outgoing; Thu, 24 Sep 1998 10:30:18 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA06949 for ; Thu, 24 Sep 1998 10:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id KAA05788; Thu, 24 Sep 1998 10:30:01 -0700 (PDT) Date: Thu, 24 Sep 1998 10:30:01 -0700 (PDT) Message-Id: <199809241730.KAA05788@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: Brian Somers Subject: Re: conf/8031: /etc/rc looks for /etc/sendmail.cf at startup Reply-To: Brian Somers Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR conf/8031; it has been noted by GNATS. From: Brian Somers To: dag-erli@ifi.uio.no (Dag-Erling C. Sm rgrav ) Cc: Studded , Drew Derbyshire , freebsd-bugs@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG Subject: Re: conf/8031: /etc/rc looks for /etc/sendmail.cf at startup Date: Thu, 24 Sep 1998 10:32:32 +0100 > Studded 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 , , 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