HEADS UP: change in ports rc.d script behaviour

Thomas-Martin Seck tmseck-lists at netcologne.de
Sun Jul 25 12:55:44 PDT 2004


* Craig Rodrigues <rodrigc at 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"}


More information about the freebsd-current mailing list