Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Aug 2008 09:10:04 GMT
From:      Jean-Charles Longuet <jclonguet@laposte.net>
To:        freebsd-rc@FreeBSD.org
Subject:   Re: conf/126392: rc.conf ifconfig_xx keywords cannot be escaped
Message-ID:  <200808230910.m7N9A4hV084462@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/126392; it has been noted by GNATS.

From: Jean-Charles Longuet <jclonguet@laposte.net>
To: bug-followup@FreeBSD.org, jclonguet@free.fr
Cc:  
Subject: Re: conf/126392: rc.conf ifconfig_xx keywords cannot be escaped
Date: Sat, 23 Aug 2008 11:02:31 +0200

 This is a multi-part message in MIME format.
 --------------080700040509060605030705
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Here is a patch for /etc/network.subr that handles a special
 string "--" so that keywords found thereafter are ignored.
 
 -- Jc
 
 --------------080700040509060605030705
 Content-Type: text/plain;
  name="network.subr.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="network.subr.patch"
 
 --- /etc/network.subr.ORIG	2008-08-12 22:24:50.000000000 +0200
 +++ /etc/network.subr	2008-08-12 22:24:59.000000000 +0200
 @@ -142,18 +142,26 @@
  		return 1
  	fi
  	_args=
 +	eoparsing=0
  
  	for _arg in $_tmpargs; do
 -		case $_arg in
 -		[Dd][Hh][Cc][Pp]) ;;
 -		[Nn][Oo][Aa][Uu][Tt][Oo]) ;;
 -		[Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;;
 -		[Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;;
 -		[Ww][Pp][Aa]) ;;
 -		*)
 +		if [ $eoparsing -eq 0 ]; then
 +			case $_arg in
 +			[Dd][Hh][Cc][Pp]) ;;
 +			[Nn][Oo][Aa][Uu][Tt][Oo]) ;;
 +			[Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;;
 +			[Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;;
 +			[Ww][Pp][Aa]) ;;
 +			--)
 +				eoparsing=1
 +				;;
 +			*)
 +				_args="$_args $_arg"
 +				;;
 +			esac
 +		else
  			_args="$_args $_arg"
 -			;;
 -		esac
 +		fi
  	done
  
  	echo $_args
 @@ -170,6 +178,9 @@
  		[Nn][Oo][Aa][Uu][Tt][Oo])
  			return 1
  			;;
 +		--)
 +			return 0
 +			;;
  		esac
  	done
  	return 0
 @@ -191,6 +202,9 @@
  		[Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp])
  			return 0
  			;;
 +		--)
 +			return 1
 +			;;
  		esac
  	done
  	return 1
 @@ -210,6 +224,13 @@
  		[Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp])
  			return 0
  			;;
 +		--)
 +			if checkyesno synchronous_dhclient; then
 +				return 0
 +			else
 +				return 1
 +			fi
 +			;;
  		esac
  	done
  	if checkyesno synchronous_dhclient; then
 @@ -229,6 +250,9 @@
  		[Ww][Pp][Aa])
  			return 0
  			;;
 +		--)
 +			return 1
 +			;;
  		esac
  	done
  	return 1
 
 --------------080700040509060605030705--



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