Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jul 2011 16:45:34 +0200
From:      Jilles Tjoelker <jilles@stack.nl>
To:        Kevin Lo <kevlo@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r224048 - head/etc/rc.d
Message-ID:  <20110715144534.GA78212@stack.nl>
In-Reply-To: <201107150159.p6F1x9rG055220@svn.freebsd.org>
References:  <201107150159.p6F1x9rG055220@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 15, 2011 at 01:59:09AM +0000, Kevin Lo wrote:
> Author: kevlo
> Date: Fri Jul 15 01:59:08 2011
> New Revision: 224048
> URL: http://svn.freebsd.org/changeset/base/224048

> Log:
>   Remove "-n" from echo

>   Reviewed by:	dougb

> Modified:
>   head/etc/rc.d/routing

> Modified: head/etc/rc.d/routing
> ==============================================================================
> --- head/etc/rc.d/routing	Fri Jul 15 01:50:40 2011	(r224047)
> +++ head/etc/rc.d/routing	Fri Jul 15 01:59:08 2011	(r224048)
> @@ -287,7 +287,7 @@ options_inet()
>  
>  	if checkyesno gateway_enable; then
>  		ropts_init
> -		echo -n ' IPv4 gateway=YES'
> +		echo ' IPv4 gateway=YES'
>  		${SYSCTL} net.inet.ip.forwarding=1 > /dev/null
>  	else
>  		${SYSCTL} net.inet.ip.forwarding=0 > /dev/null
> @@ -322,7 +322,7 @@ options_inet6()
>  {
>  	if checkyesno ipv6_gateway_enable; then
>  		ropts_init
> -		echo -n ' IPv6 gateway=YES'
> +		echo ' IPv6 gateway=YES'
>  		${SYSCTL} net.inet6.ip6.forwarding=1 > /dev/null
>  	else
>  		${SYSCTL} net.inet6.ip6.forwarding=0 > /dev/null

It looks like this has been added because some IPv6 code is printing
stuff about routes for ::ffff:0.0.0.0, ::0.0.0.0, fe80:: and ff02::,
which often gets in between things on the "Additional routing options:"
line, leading to ugly output.

However, it is inconsistent to change this for the gateway options only
and not for the other options and makes output uglier unnecessarily in
the !IPv6 case.

Perhaps it is best to use a separate line for each af, finishing it
within the options_$af function.

-- 
Jilles Tjoelker



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