From owner-freebsd-bugs Thu Sep 24 10:26:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA06109 for freebsd-bugs-outgoing; Thu, 24 Sep 1998 10:26:01 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from awfulhak.org (awfulhak.force9.co.uk [195.166.136.63]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA06070; Thu, 24 Sep 1998 10:25:48 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from woof.lan.awfulhak.org (brian@woof.lan.awfulhak.org [172.16.0.7]) by awfulhak.org (8.8.8/8.8.8) with ESMTP id SAA14380; Thu, 24 Sep 1998 18:25:36 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from woof.lan.awfulhak.org (brian@localhost [127.0.0.1]) by woof.lan.awfulhak.org (8.9.1/8.9.1) with ESMTP id KAA04923; Thu, 24 Sep 1998 10:32:33 +0100 (BST) (envelope-from brian@woof.lan.awfulhak.org) Message-Id: <199809240932.KAA04923@woof.lan.awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 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 In-reply-to: Your message of "23 Sep 1998 21:20:15 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Date: Thu, 24 Sep 1998 10:32:32 +0100 From: Brian Somers Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id KAA06080 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > 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