#!/bin/bash
#
# Use the EVMS CLI to create a volume. Specifying a name will create an EVMS
# volume. Not specifying a name will create a compatibility volume.

object=$1
name=$2

if [ -z $object ]; then
	echo "USAGE: `basename $0` object [name]"
	exit 1
fi

if [ -z $name ]; then
	arg="Compatibility"
else
	arg="Name=$name"
fi

evms -s << EOF > /dev/null
create:volume,${object},${arg}
EOF

