From owner-svn-src-head@FreeBSD.ORG Thu Aug 19 06:07:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F31DE106564A; Thu, 19 Aug 2010 06:07:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C801A8FC13; Thu, 19 Aug 2010 06:07:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7J67nZH091948; Thu, 19 Aug 2010 06:07:49 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7J67nWO091944; Thu, 19 Aug 2010 06:07:49 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201008190607.o7J67nWO091944@svn.freebsd.org> From: Warner Losh Date: Thu, 19 Aug 2010 06:07:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211489 - in head/usr.sbin/pc-sysinstall: backend-query pc-sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2010 06:07:50 -0000 Author: imp Date: Thu Aug 19 06:07:49 2010 New Revision: 211489 URL: http://svn.freebsd.org/changeset/base/211489 Log: Added "-m" option to "disk-list" to list memory disks along with standard disks. PR: 149749 Submitted by: John Hixson Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh Thu Aug 19 06:05:05 2010 (r211488) +++ head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh Thu Aug 19 06:07:49 2010 (r211489) @@ -54,15 +54,18 @@ HEADS="${VAL}" get_disk_sectors "${DISK}" SECS="${VAL}" -echo "cylinders=${CYLS}" -echo "heads=${HEADS}" -echo "sectors=${SECS}" # Now get the disks size in MB KB="`diskinfo -v ${1} | grep 'bytes' | cut -d '#' -f 1 | tr -s '\t' ' ' | tr -d ' '`" MB=$(convert_byte_to_megabyte ${KB}) -echo "size=$MB" # Now get the Controller Type CTYPE="`dmesg | grep "^${1}:" | grep "B <" | cut -d '>' -f 2 | cut -d ' ' -f 3-10`" + + +echo "cylinders=${CYLS}" +echo "heads=${HEADS}" +echo "sectors=${SECS}" +echo "size=$MB" echo "type=$CTYPE" + Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Thu Aug 19 06:05:05 2010 (r211488) +++ head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Thu Aug 19 06:07:49 2010 (r211489) @@ -25,8 +25,18 @@ # # $FreeBSD$ +ARGS=$1 + # Create our device listing SYSDISK=$(sysctl -n kern.disks) +if [ "${ARGS}" = "-m" ] +then + MDS=`mdconfig -l` + if [ -n "${MDS}" ] + then + SYSDISK="${SYSDISK} ${MDS}" + fi +fi # Now loop through these devices, and list the disk drives for i in ${SYSDISK} @@ -45,6 +55,10 @@ do if [ -z "$NEWLINE" ]; then NEWLINE=" " fi + if echo "${DEV}" | grep -E '^md[0-9]+' >/dev/null 2>/dev/null + then + NEWLINE=" " + fi # Save the disk list if [ ! -z "$DLIST" ] Modified: head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Thu Aug 19 06:05:05 2010 (r211488) +++ head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Thu Aug 19 06:07:49 2010 (r211489) @@ -143,7 +143,7 @@ case $1 in ;; # The user is wanting to query which disks are available - disk-list) ${QUERYDIR}/disk-list.sh + disk-list) ${QUERYDIR}/disk-list.sh "${2}" ;; # The user is wanting to query a disk's partitions