svn commit: r233220 - in stable/9/usr.sbin/pc-sysinstall: backend backend-partmanager

Josh Paetzel jpaetzel at FreeBSD.org
Mon Mar 19 23:04:21 UTC 2012


Author: jpaetzel
Date: Mon Mar 19 23:04:21 2012
New Revision: 233220
URL: http://svn.freebsd.org/changeset/base/233220

Log:
  MFC: 232889
  
  Make sure when creating new MBR partition it is set to active by default.
  
  Submitted by:	kmoore
  Obtained from:	PC-BSD

Modified:
  stable/9/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh
  stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh
Directory Properties:
  stable/9/usr.sbin/pc-sysinstall/   (props changed)

Modified: stable/9/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh
==============================================================================
--- stable/9/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh	Mon Mar 19 22:59:19 2012	(r233219)
+++ stable/9/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh	Mon Mar 19 23:04:21 2012	(r233220)
@@ -86,7 +86,12 @@ fi
 # If this is an empty disk, see if we need to create a new scheme for it
 gpart show ${DISK} >/dev/null 2>/dev/null
 if [ $? -eq 0 -a "${SLICENUM}" = "1" ] ; then
- gpart create -s ${TYPE} ${DISK}
+  if [ "${TYPE}" = "mbr" -o "${TYPE}" = "MBR" ] ; then 
+    flags="-s ${TYPE} -f active"
+  else
+    flags="-s ${TYPE}"
+  fi
+  gpart create ${flags} ${DISK}
 fi
 
 # If we have a starting block, use it

Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh
==============================================================================
--- stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh	Mon Mar 19 22:59:19 2012	(r233219)
+++ stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh	Mon Mar 19 23:04:21 2012	(r233220)
@@ -641,7 +641,7 @@ init_mbr_full_disk()
   sleep 2
 
   echo_log "Running gpart on ${_intDISK}"
-  rc_halt "gpart create -s mbr ${_intDISK}"
+  rc_halt "gpart create -s mbr -f active ${_intDISK}"
 
   # Lets figure out disk size in blocks
   # Get the cyl of this disk


More information about the svn-src-stable-9 mailing list