From owner-svn-src-stable@FreeBSD.ORG Mon Mar 19 23:09:30 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E232A1065680; Mon, 19 Mar 2012 23:09:30 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3AA58FC1A; Mon, 19 Mar 2012 23:09:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2JN9Uxw090982; Mon, 19 Mar 2012 23:09:30 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2JN9UVN090980; Mon, 19 Mar 2012 23:09:30 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201203192309.q2JN9UVN090980@svn.freebsd.org> From: Josh Paetzel Date: Mon, 19 Mar 2012 23:09:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233221 - stable/9/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2012 23:09:31 -0000 Author: jpaetzel Date: Mon Mar 19 23:09:30 2012 New Revision: 233221 URL: http://svn.freebsd.org/changeset/base/233221 Log: MFC: 232890 Fix a couple of bugs saving network config. Don't duplicate wlans_ lines. Enable ipv6 on wireless devices correctly. Submitted by: kmoore Obtained from: PC-BSD Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-networking.sh Directory Properties: stable/9/usr.sbin/pc-sysinstall/ (props changed) Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-networking.sh ============================================================================== --- stable/9/usr.sbin/pc-sysinstall/backend/functions-networking.sh Mon Mar 19 23:04:21 2012 (r233220) +++ stable/9/usr.sbin/pc-sysinstall/backend/functions-networking.sh Mon Mar 19 23:09:30 2012 (r233221) @@ -104,7 +104,10 @@ enable_dhcp_all() then # We have a wifi device, setup a wlan* entry for it WLAN="wlan${WLANCOUNT}" - echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf + cat ${FSMNT}/etc/rc.conf | grep -q "wlans_${NIC}=" + if [ $? -ne 0 ] ; then + echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf + fi echo "ifconfig_${WLAN}=\"DHCP\"" >>${FSMNT}/etc/rc.conf CNIC="${WLAN}" WLANCOUNT=$((WLANCOUNT+1)) @@ -138,7 +141,7 @@ enable_slaac_all() do NIC="`echo $line | cut -d ':' -f 1`" DESC="`echo $line | cut -d ':' -f 2`" - echo_log "Setting $NIC to acceptign RAs on the system." + echo_log "Setting $NIC to accepting RAs on the system." check_is_wifi ${NIC} if [ $? -eq 0 ] then @@ -146,9 +149,12 @@ enable_slaac_all() # Given we cannot have DHCP and SLAAC the same time currently # it's save to just duplicate. WLAN="wlan${WLANCOUNT}" - echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf + cat ${FSMNT}/etc/rc.conf | grep -q "wlans_${NIC}=" + if [ $? -ne 0 ] ; then + echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf + fi #echo "ifconfig_${NIC}=\"up\"" >>${FSMNT}/etc/rc.conf - echo "ifconfig_${WLAN}=\"inet6 accept_rtadv\"" >>${FSMNT}/etc/rc.conf + echo "ifconfig_${WLAN}_ipv6=\"inet6 accept_rtadv\"" >>${FSMNT}/etc/rc.conf CNIC="${WLAN}" WLANCOUNT=$((WLANCOUNT+1)) else