summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pc-sysinstall/backend/functions-disk.sh
diff options
context:
space:
mode:
authorjpaetzel <jpaetzel@FreeBSD.org>2011-01-08 20:25:00 +0000
committerjpaetzel <jpaetzel@FreeBSD.org>2011-01-08 20:25:00 +0000
commit0ed3bd02d8dc1c65a161d1e4c6047fdd53e2e08f (patch)
tree3eeb69263f93fdc66066692d215e8fccd03cbc66 /usr.sbin/pc-sysinstall/backend/functions-disk.sh
parent33ad050e0eedf7276932202e25c9e7581c5d529b (diff)
downloadFreeBSD-src-0ed3bd02d8dc1c65a161d1e4c6047fdd53e2e08f.zip
FreeBSD-src-0ed3bd02d8dc1c65a161d1e4c6047fdd53e2e08f.tar.gz
More elegant way to detect MBR vs. GPT
Submitted by: nwhitehorn Approved by: imp
Diffstat (limited to 'usr.sbin/pc-sysinstall/backend/functions-disk.sh')
-rwxr-xr-xusr.sbin/pc-sysinstall/backend/functions-disk.sh7
1 files changed, 1 insertions, 6 deletions
diff --git a/usr.sbin/pc-sysinstall/backend/functions-disk.sh b/usr.sbin/pc-sysinstall/backend/functions-disk.sh
index 0b14591..6ef1c84 100755
--- a/usr.sbin/pc-sysinstall/backend/functions-disk.sh
+++ b/usr.sbin/pc-sysinstall/backend/functions-disk.sh
@@ -180,12 +180,7 @@ get_disk_partitions()
return
fi
- gpart show ${1} | grep "MBR" >/dev/null 2>/dev/null
- if [ "$?" = "0" ] ; then
- type="MBR"
- else
- type="GPT"
- fi
+ type=`gpart show ${1} | awk '/^=>/ { printf("%s",$5); }'`
SLICES="`gpart show ${1} | grep -v ${1} | grep -v ' free ' |tr -s '\t' ' ' | cut -d ' ' -f 4 | sed '/^$/d'`"
for i in ${SLICES}
OpenPOWER on IntegriCloud