Skip site navigation (1)Skip section navigation (2)
Date:      25 Jul 2004 19:55:34 -0000
From:      tmseck-lists@netcologne.de (Thomas-Martin Seck)
To:        Craig Rodrigues <rodrigc@crodrigues.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: HEADS UP: change in ports rc.d script behaviour
Message-ID:  <20040725195534.17806.qmail@laurel.tmseck.homedns.org>
In-Reply-To: <20040725173934.GA1213@crodrigues.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Craig Rodrigues <rodrigc@crodrigues.org> [gmane.os.freebsd.current]:

> On Sun, Jul 25, 2004 at 05:12:08PM +0300, Mike Makonnen wrote:
>> 4. If you must include a default value for an rc.conf(5) knob,
>>    make sure that you put it in an if [ -z "$foo_knob"] clause.
> 
> As a simple alternative to an if clause, I've done this for the 
> isc-dhcp3-server port:
> 
> [ -z "$dhcpd_enable" ] && dhcpd_enable="NO"

Even simpler:

foo_enable=${foo_enable:-"NO"}

or

: ${foo_enable:="NO"}



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