From bad67ce27650e5aca7c35dc908fe139ce39d55a7 Mon Sep 17 00:00:00 2001 From: jpaetzel Date: Sun, 6 Nov 2011 15:58:56 +0000 Subject: [PATCH] MFC 227118: Roll up several patches used by PC-BSD. - Fix an issue with gmirror. - Allow IPv4 DHCP and IPv6 SLAAC concurrently. - Fix zpool options using the wrong device name. Approved by: re Obtained from: kris@pcbsd.org git-svn-id: svn://svn.freebsd.org/base/stable/9@227219 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh | 2 +- usr.sbin/pc-sysinstall/backend/functions-disk.sh | 3 ++- usr.sbin/pc-sysinstall/backend/functions-networking.sh | 8 ++++++++ usr.sbin/pc-sysinstall/backend/functions-unmount.sh | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh b/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh index 5b3069558..ba8cccd0c 100755 --- a/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh +++ b/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh @@ -280,7 +280,7 @@ setup_gpart_partitions() if [ "${_pType}" = "gpt" ] ; then get_fs_line_xvars "${_pDisk}p${CURPART}" "${STRING}" else - get_fs_line_xvars "${_wSlice}" "${STRING}" + get_fs_line_xvars "${_wSlice}${PARTLETTER}" "${STRING}" fi XTRAOPTS="${VAR}" diff --git a/usr.sbin/pc-sysinstall/backend/functions-disk.sh b/usr.sbin/pc-sysinstall/backend/functions-disk.sh index 73c3eb4c1..c3f1b2277 100755 --- a/usr.sbin/pc-sysinstall/backend/functions-disk.sh +++ b/usr.sbin/pc-sysinstall/backend/functions-disk.sh @@ -470,7 +470,8 @@ setup_disk_slice() # Default to round-robin if the user didn't specify if [ -z "$MIRRORBAL" ]; then MIRRORBAL="round-robin" ; fi - echo "$MIRRORDISK:$MIRRORBAL:gm${gmnum}" >${MIRRORCFGDIR}/$DISK + _mFile=`echo $DISK | sed 's|/|%|g'` + echo "$MIRRORDISK:$MIRRORBAL:gm${gmnum}" >${MIRRORCFGDIR}/$_mFile init_gmirror "$gmnum" "$MIRRORBAL" "$DISK" "$MIRRORDISK" # Reset DISK to the gmirror device diff --git a/usr.sbin/pc-sysinstall/backend/functions-networking.sh b/usr.sbin/pc-sysinstall/backend/functions-networking.sh index bdd5a1a84..6b8cb1e0a 100755 --- a/usr.sbin/pc-sysinstall/backend/functions-networking.sh +++ b/usr.sbin/pc-sysinstall/backend/functions-networking.sh @@ -431,6 +431,10 @@ start_networking() elif [ "$NETDEV" = "IPv6-SLAAC" ] then enable_auto_slaac + elif [ "$NETDEV" = "AUTO-DHCP-SLAAC" ] + then + enable_auto_dhcp + enable_auto_slaac else enable_manual_nic ${NETDEV} fi @@ -457,6 +461,10 @@ save_networking_install() elif [ "$NETDEV" = "IPv6-SLAAC" ] then save_auto_slaac + elif [ "$NETDEV" = "AUTO-DHCP-SLAAC" ] + then + save_auto_dhcp + save_auto_slaac else save_manual_nic ${NETDEV} fi diff --git a/usr.sbin/pc-sysinstall/backend/functions-unmount.sh b/usr.sbin/pc-sysinstall/backend/functions-unmount.sh index 23630f767..57a417ef6 100755 --- a/usr.sbin/pc-sysinstall/backend/functions-unmount.sh +++ b/usr.sbin/pc-sysinstall/backend/functions-unmount.sh @@ -43,7 +43,7 @@ start_gmirror_sync() { cd ${MIRRORCFGDIR} - for DISK in `ls *` + for DISK in `ls ${MIRRORCFGDIR}` do MIRRORDISK="`cat ${DISK} | cut -d ':' -f 1`" MIRRORBAL="`cat ${DISK} | cut -d ':' -f 2`" @@ -51,7 +51,7 @@ start_gmirror_sync() # Start the mirroring service rc_nohalt "gmirror forget ${MIRRORNAME}" - rc_halt "gmirror insert ${MIRRORNAME} /dev/${MIRRORDISK}" + rc_halt "gmirror insert ${MIRRORNAME} ${MIRRORDISK}" done -- 2.45.0