[PC-BSD Commits] r16159 - pcbsd/current/build-files/src-patches

svn at pcbsd.org svn at pcbsd.org
Mon Apr 2 13:39:10 PDT 2012


Author: kris
Date: 2012-04-02 20:39:10 +0000 (Mon, 02 Apr 2012)
New Revision: 16159

Modified:
   pcbsd/current/build-files/src-patches/patch-pc-sysinstall-multiipconfig
Log:

Update the patch for pc-sysinstall which does the multi NIC configuration,
works on V6 now as well



Modified: pcbsd/current/build-files/src-patches/patch-pc-sysinstall-multiipconfig
===================================================================
--- pcbsd/current/build-files/src-patches/patch-pc-sysinstall-multiipconfig	2012-04-02 20:14:54 UTC (rev 16158)
+++ pcbsd/current/build-files/src-patches/patch-pc-sysinstall-multiipconfig	2012-04-02 20:39:10 UTC (rev 16159)
@@ -1,8 +1,8 @@
 Index: usr.sbin/pc-sysinstall/backend/functions-networking.sh
 ===================================================================
---- usr.sbin/pc-sysinstall/backend/functions-networking.sh	(revision 192)
-+++ usr.sbin/pc-sysinstall/backend/functions-networking.sh	(revision 193)
-@@ -126,7 +126,7 @@
+--- usr.sbin/pc-sysinstall/backend/functions-networking.sh	(revision 233813)
++++ usr.sbin/pc-sysinstall/backend/functions-networking.sh	(working copy)
+@@ -192,7 +192,7 @@
    # Get the target nic
    NIC="$1"
  
@@ -11,64 +11,78 @@
    NETIP="${VAL}"
   
    if [ "$NETIP" = "DHCP" ]
-@@ -142,17 +142,22 @@
-   IFARGS="inet ${NETIP}"
+@@ -212,7 +212,7 @@
+     IFARGS="inet ${NETIP}"
  
-   # Check if we have a netmask to set
--  get_value_from_cfg netSaveMask
-+  get_value_from_cfg netSaveMask_${NIC}
-   NETMASK="${VAL}"
-   if [ ! -z "${NETMASK}" ]
+     # Check if we have a netmask to set
+-    get_value_from_cfg netSaveMask
++    get_value_from_cfg netSaveMask_${NIC}
+     NETMASK="${VAL}"
+     if [ -n "${NETMASK}" ]
+     then
+@@ -220,7 +220,7 @@
+     fi
+   fi
+ 
+-  get_value_from_cfg netSaveIPv6
++  get_value_from_cfg netSaveIPv6_${NIC}
+   NETIP6="${VAL}"
+   if [ -n "${NETIP6}" ]
    then
-     IFARGS="${IFARGS} netmask ${NETMASK}"
+@@ -239,6 +239,12 @@
+     echo "ifconfig_${NIC}_ipv6=\"${IF6ARGS}\"" >>${FSMNT}/etc/rc.conf
    fi
  
--
-   echo "# Auto-Enabled NICs from pc-sysinstall" >>${FSMNT}/etc/rc.conf
-   echo "ifconfig_${NIC}=\"${IFARGS}\"" >>${FSMNT}/etc/rc.conf
- 
 +};
 +
-+
 +# Function which saves a manual gateway router setup to the installed system
 +save_manual_router()
 +{
++
    # Check if we have a default router to set
    get_value_from_cfg netSaveDefaultRouter
    NETROUTE="${VAL}"
-@@ -161,16 +166,26 @@
-     echo "defaultrouter=\"${NETROUTE}\"" >>${FSMNT}/etc/rc.conf
+@@ -253,19 +259,30 @@
+     echo "ipv6_defaultrouter=\"${NETROUTE}\"" >>${FSMNT}/etc/rc.conf
    fi
  
 +};
 +
-+
-+# Function which saves a manual nameserver setup to the installed system
 +save_manual_nameserver()
 +{
    # Check if we have a nameserver to enable
+   : > ${FSMNT}/etc/resolv.conf
 -  get_value_from_cfg netSaveNameServer
 -  NAMESERVER="${VAL}"
--  if [ ! -z "${NAMESERVER}" ]
+-  if [ -n "${NAMESERVER}" ]
 +  get_value_from_cfg_with_spaces netSaveNameServer
 +  NAMESERVERLIST="${VAL}"
 +  if [ ! -z "${NAMESERVERLIST}" ]
    then
--    echo "nameserver ${NAMESERVER}" >${FSMNT}/etc/resolv.conf
+-    echo "nameserver ${NAMESERVER}" >>${FSMNT}/etc/resolv.conf
 +    for NAMESERVER in ${NAMESERVERLIST}
 +    do
-+      echo "nameserver ${NAMESERVER}" >${FSMNT}/etc/resolv.conf
++      echo "nameserver ${NAMESERVER}" >>${FSMNT}/etc/resolv.conf
 +    done
    fi
-  
+-  get_value_from_cfg netSaveIPv6NameServer
+-  NAMESERVER="${VAL}"
+-  if [ -n "${NAMESERVER}" ]
++
++  get_value_from_cfg_with_spaces netSaveIPv6NameServer
++  NAMESERVERLIST="${VAL}"
++  if [ ! -z "${NAMESERVERLIST}" ]
+   then
+-    echo "nameserver ${NAMESERVER}" >>${FSMNT}/etc/resolv.conf
++    for NAMESERVER in ${NAMESERVERLIST}
++    do
++      echo "nameserver ${NAMESERVER}" >>${FSMNT}/etc/resolv.conf
++    done
+   fi
+ 
  };
- 
-+
- # Function which determines if a nic is active / up
- is_nic_active()
+@@ -454,25 +471,30 @@
  {
-@@ -294,18 +309,23 @@
- {
  
    # Check if we have any networking requested to save
 -  get_value_from_cfg netSaveDev
@@ -84,6 +98,15 @@
 +  if [ "$NETDEVLIST" = "AUTO-DHCP" ]
    then
      save_auto_dhcp
+-  elif [ "$NETDEV" = "IPv6-SLAAC" ]
++  elif [ "$NETDEVLIST" = "IPv6-SLAAC" ]
+   then
+     save_auto_slaac
+-  elif [ "$NETDEV" = "AUTO-DHCP-SLAAC" ]
++  elif [ "$NETDEVLIST" = "AUTO-DHCP-SLAAC" ]
+   then
+     save_auto_dhcp
+     save_auto_slaac
    else
 -    save_manual_nic ${NETDEV}
 +    for NETDEV in ${NETDEVLIST}



More information about the Commits mailing list