Project

General

Profile

Download (328 Bytes) Statistics
| Branch: | Tag: | Revision:
1
#!/bin/sh
2
DISK=$1
3
if [ "$DISK" = "" ]; then
4
	echo "You must specify the disk that should be formatted/cleared."
5
	exit 1
6
fi
7
for PART in `/sbin/gpart show $DISK | grep -v '=>' | awk '{ print $3 }'`; do
8
	if [ "$PART" != "" ]; then
9
		/sbin/gpart delete -i $PART $DISK >/dev/null
10
	fi
11
done
12
/sbin/gpart destroy $DISK >/dev/null
13
exit 0
(3-3/24)