From nobody@FreeBSD.org  Tue Dec  7 17:52:24 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C3EA71065670
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  7 Dec 2010 17:52:24 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id AA0F08FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  7 Dec 2010 17:52:24 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oB7HqOGU006394
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 7 Dec 2010 17:52:24 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oB7HqO95006393;
	Tue, 7 Dec 2010 17:52:24 GMT
	(envelope-from nobody)
Message-Id: <201012071752.oB7HqO95006393@red.freebsd.org>
Date: Tue, 7 Dec 2010 17:52:24 GMT
From: Kris Moore <kmoore@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bin: usr.sbin/pc-sysinstall - Fixes for pc-sysinstall with lagg/tmpfs
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         152894
>Category:       bin
>Synopsis:       [patch] pc-sysinstall(8) - Fixes for pc-sysinstall with lagg/tmpfs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    imp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 07 18:00:20 UTC 2010
>Closed-Date:    Sat Jan 08 22:44:03 UTC 2011
>Last-Modified:  Sat Jan  8 22:50:06 UTC 2011
>Originator:     Kris Moore
>Release:        9.0-Current
>Organization:
iXsystems
>Environment:
FreeBSD 9-Current
>Description:
This fixes a few small issues in pc-sysinstall, relating to not wanting to use the "lagg" interface by default for wifi, as well as not using tmpfs for PC-BSD specific installs. 
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN src.o/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh src/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh
--- src.o/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh	2010-12-07 11:03:39.175621906 -0500
+++ src/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh	2010-12-07 11:09:57.718994760 -0500
@@ -233,7 +233,6 @@
   then
     echo "procfs			/proc			procfs		rw		0	0" >> ${FSTAB}
     echo "linprocfs		/compat/linux/proc	linprocfs	rw		0	0" >> ${FSTAB}
-    echo "tmpfs				/tmp			tmpfs		rw,mode=1777	0	0" >> ${FSTAB}
   fi
 
   # If we have a dedicated /boot, run the post-install setup of it now
diff -ruN src.o/usr.sbin/pc-sysinstall/backend/functions-networking.sh src/usr.sbin/pc-sysinstall/backend/functions-networking.sh
--- src.o/usr.sbin/pc-sysinstall/backend/functions-networking.sh	2010-12-07 11:03:39.173615019 -0500
+++ src/usr.sbin/pc-sysinstall/backend/functions-networking.sh	2010-12-07 11:08:39.178862859 -0500
@@ -54,7 +54,7 @@
   fi
 };
 
-# Function to get the first available wired nic, used for lagg0 setup
+# Function to get the first available wired nic, used for setup
 get_first_wired_nic()
 {
   rm ${TMPDIR}/.niclist >/dev/null 2>/dev/null
@@ -78,8 +78,9 @@
   return
 };
 
-# Function which simply enables plain dhcp on all detected nics, not fancy lagg interface
-enable_plain_dhcp_all()
+
+# Function which simply enables plain dhcp on all detected nics
+enable_dhcp_all()
 {
   rm ${TMPDIR}/.niclist >/dev/null 2>/dev/null
   # start by getting a list of nics on this system
@@ -111,57 +112,11 @@
   fi
 };
 
-# Function which enables fancy lagg dhcp on specified wifi 
-enable_lagg_dhcp()
-{
-  WIFINIC="$1"
-  
-  # Get the first wired nic
-  get_first_wired_nic
-  WIRENIC=$VAL
-  LAGGPORT="laggport ${WIFINIC}"
-
-  echo "# Auto-Enabled NICs from pc-sysinstall" >>${FSMNT}/etc/rc.conf
-  if [ ! -z "$WIRENIC" ]
-  then
-    echo "ifconfig_${WIRENIC}=\"up\"" >> ${FSMNT}/etc/rc.conf
-    echo "ifconfig_${WIFINIC}=\"\`ifconfig ${WIRENIC} ether\`\"" >> ${FSMNT}/etc/rc.conf
-    echo "ifconfig_${WIFINIC}=\"ether \${ifconfig_${WIFINIC}##*ether }\"" >> ${FSMNT}/etc/rc.conf
-    LAGGPORT="laggport ${WIRENIC} ${LAGGPORT}"
-  fi
-  
-  echo "wlans_${WIFINIC}=\"wlan0\"" >> ${FSMNT}/etc/rc.conf
-  echo "cloned_interfaces=\"lagg0\"" >> ${FSMNT}/etc/rc.conf
-  echo "ifconfig_lagg0=\"laggproto failover ${LAGGPORT} DHCP\"" >> ${FSMNT}/etc/rc.conf
-
-};
 
-# Function which detects available nics, and runs them to DHCP on the
+# Function which detects available nics, and enables dhcp on them
 save_auto_dhcp()
 {
-  rm ${TMPDIR}/.niclist >/dev/null 2>/dev/null
-  # start by getting a list of nics on this system
-  ${QUERYDIR}/detect-nics.sh > ${TMPDIR}/.niclist
-  if [ -e "${TMPDIR}/.niclist" ]
-  then
-    while read line
-    do
-      NIC="`echo $line | cut -d ':' -f 1`"
-      DESC="`echo $line | cut -d ':' -f 2`"
-      check_is_wifi "${NIC}"
-      if [ "$?" = "0" ]
-      then
-        # We have a wifi device, lets do fancy lagg interface
-        enable_lagg_dhcp "${NIC}"
-        return
-      fi
- 
-    done < ${TMPDIR}/.niclist 
-  fi
-
-  # Got here, looks like no wifi, so lets simply enable plain-ole-dhcp
-  enable_plain_dhcp_all
-
+  enable_dhcp_all
 };
 
 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Dec 7 19:05:35 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152894 
State-Changed-From-To: open->closed 
State-Changed-By: jpaetzel 
State-Changed-When: Sat Jan 8 22:43:37 UTC 2011 
State-Changed-Why:  
Committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152894 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/152894: commit references a PR
Date: Sat,  8 Jan 2011 22:43:02 +0000 (UTC)

 Author: jpaetzel (ports committer)
 Date: Sat Jan  8 22:42:56 2011
 New Revision: 217170
 URL: http://svn.freebsd.org/changeset/base/217170
 
 Log:
   Push some PC-BSD specific fixes upstream.
   
   PR:	bin/152894
   Submitted by:	Kris Moore <kmoore@FreeBSD.org>
   Approved by:	imp
 
 Modified:
   head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh
   head/usr.sbin/pc-sysinstall/backend/functions-networking.sh
 
 Modified: head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh
 ==============================================================================
 --- head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh	Sat Jan  8 22:33:46 2011	(r217169)
 +++ head/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh	Sat Jan  8 22:42:56 2011	(r217170)
 @@ -233,7 +233,6 @@ setup_fstab()
    then
      echo "procfs			/proc			procfs		rw		0	0" >> ${FSTAB}
      echo "linprocfs		/compat/linux/proc	linprocfs	rw		0	0" >> ${FSTAB}
 -    echo "tmpfs				/tmp			tmpfs		rw,mode=1777	0	0" >> ${FSTAB}
    fi
  
    # If we have a dedicated /boot, run the post-install setup of it now
 
 Modified: head/usr.sbin/pc-sysinstall/backend/functions-networking.sh
 ==============================================================================
 --- head/usr.sbin/pc-sysinstall/backend/functions-networking.sh	Sat Jan  8 22:33:46 2011	(r217169)
 +++ head/usr.sbin/pc-sysinstall/backend/functions-networking.sh	Sat Jan  8 22:42:56 2011	(r217170)
 @@ -54,7 +54,7 @@ check_is_wifi()
    fi
  };
  
 -# Function to get the first available wired nic, used for lagg0 setup
 +# Function to get the first available wired nic, used for setup
  get_first_wired_nic()
  {
    rm ${TMPDIR}/.niclist >/dev/null 2>/dev/null
 @@ -78,8 +78,9 @@ get_first_wired_nic()
    return
  };
  
 -# Function which simply enables plain dhcp on all detected nics, not fancy lagg interface
 -enable_plain_dhcp_all()
 +
 +# Function which simply enables plain dhcp on all detected nics
 +enable_dhcp_all()
  {
    rm ${TMPDIR}/.niclist >/dev/null 2>/dev/null
    # start by getting a list of nics on this system
 @@ -111,57 +112,11 @@ enable_plain_dhcp_all()
    fi
  };
  
 -# Function which enables fancy lagg dhcp on specified wifi 
 -enable_lagg_dhcp()
 -{
 -  WIFINIC="$1"
 -  
 -  # Get the first wired nic
 -  get_first_wired_nic
 -  WIRENIC=$VAL
 -  LAGGPORT="laggport ${WIFINIC}"
 -
 -  echo "# Auto-Enabled NICs from pc-sysinstall" >>${FSMNT}/etc/rc.conf
 -  if [ ! -z "$WIRENIC" ]
 -  then
 -    echo "ifconfig_${WIRENIC}=\"up\"" >> ${FSMNT}/etc/rc.conf
 -    echo "ifconfig_${WIFINIC}=\"\`ifconfig ${WIRENIC} ether\`\"" >> ${FSMNT}/etc/rc.conf
 -    echo "ifconfig_${WIFINIC}=\"ether \${ifconfig_${WIFINIC}##*ether }\"" >> ${FSMNT}/etc/rc.conf
 -    LAGGPORT="laggport ${WIRENIC} ${LAGGPORT}"
 -  fi
 -  
 -  echo "wlans_${WIFINIC}=\"wlan0\"" >> ${FSMNT}/etc/rc.conf
 -  echo "cloned_interfaces=\"lagg0\"" >> ${FSMNT}/etc/rc.conf
 -  echo "ifconfig_lagg0=\"laggproto failover ${LAGGPORT} DHCP\"" >> ${FSMNT}/etc/rc.conf
 -
 -};
  
 -# Function which detects available nics, and runs them to DHCP on the
 +# Function which detects available nics, and enables dhcp on them
  save_auto_dhcp()
  {
 -  rm ${TMPDIR}/.niclist >/dev/null 2>/dev/null
 -  # start by getting a list of nics on this system
 -  ${QUERYDIR}/detect-nics.sh > ${TMPDIR}/.niclist
 -  if [ -e "${TMPDIR}/.niclist" ]
 -  then
 -    while read line
 -    do
 -      NIC="`echo $line | cut -d ':' -f 1`"
 -      DESC="`echo $line | cut -d ':' -f 2`"
 -      check_is_wifi "${NIC}"
 -      if [ "$?" = "0" ]
 -      then
 -        # We have a wifi device, lets do fancy lagg interface
 -        enable_lagg_dhcp "${NIC}"
 -        return
 -      fi
 - 
 -    done < ${TMPDIR}/.niclist 
 -  fi
 -
 -  # Got here, looks like no wifi, so lets simply enable plain-ole-dhcp
 -  enable_plain_dhcp_all
 -
 +  enable_dhcp_all
  };
  
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
