svn commit: r298946 - head/usr.sbin/bsdinstall/scripts

Allan Jude allanjude at freebsd.org
Mon May 23 05:00:29 UTC 2016


On 2016-05-23 00:49, Allan Jude wrote:
> On 2016-05-02 17:40, Andriy Voskoboinyk wrote:
>> Author: avos
>> Date: Mon May  2 21:40:34 2016
>> New Revision: 298946
>> URL: https://svnweb.freebsd.org/changeset/base/298946
>>
>> Log:
>>   bsdinstall: fix static address assignment for protected wireless networks.
>>   
>>   Filter out IFCONFIG_PREFIX variable (which may contain WPA keyword)
>>   from ifconfig parameters.
>>   
>>   PR:		169199
>>
>> Modified:
>>   head/usr.sbin/bsdinstall/scripts/netconfig_ipv4
>>
>> Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv4
>> ==============================================================================
>> --- head/usr.sbin/bsdinstall/scripts/netconfig_ipv4	Mon May  2 21:23:05 2016	(r298945)
>> +++ head/usr.sbin/bsdinstall/scripts/netconfig_ipv4	Mon May  2 21:40:34 2016	(r298946)
>> @@ -84,7 +84,7 @@ retval=$?
>>  
>>  if [ "$BSDINSTALL_CONFIGCURRENT" ]; then
>>  	. $BSDINSTALL_TMPETC/._rc.conf.net
>> -	ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE`
>> +	ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE | sed "s|$2||"`
>>  	if [ "$defaultrouter" ]; then
>>  		route delete -inet default
>>  		route add -inet default $defaultrouter
>>
> 
> This breaks static assignment of IP addresses to wired interfaces:
> 
> sed: first RE may not be empty
> 
> 

I wrote this patch for the issue. Unless you see a better way to do it?


-- 
Allan Jude
-------------- next part --------------
Index: usr.sbin/bsdinstall/scripts/netconfig_ipv4
===================================================================
--- usr.sbin/bsdinstall/scripts/netconfig_ipv4	(revision 300436)
+++ usr.sbin/bsdinstall/scripts/netconfig_ipv4	(working copy)
@@ -84,7 +84,11 @@
 
 if [ "$BSDINSTALL_CONFIGCURRENT" ]; then
 	. $BSDINSTALL_TMPETC/._rc.conf.net
-	ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE | sed "s|$2||"`
+	if [ -n "$2" ]; then
+		ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE | sed "s|$2||"`
+	else
+		ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE`
+	fi
 	if [ "$defaultrouter" ]; then
 		route delete -inet default
 		route add -inet default $defaultrouter


More information about the svn-src-head mailing list