3 TEMP=`getopt -o o:n:i:b:s: -n '$0' -- "$@"`
4 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
5 # Note the quotes around `$TEMP': they are essential!
9 -i|-o) instance=$2; shift 2;;
11 -n) new_name=$2; shift 2;;
13 -b) blockdev=$2; shift 2;;
15 -s) swapdev=$2; shift 2;;
19 *) echo "Internal error!"; exit 1;;
22 if [ -z "$instance" -o -z "$blockdev" ]; then
23 echo "Missing OS API Argument"
26 if [ "$0" != "export" -a -z "$swapdev" ]; then
27 echo "Missing OS API Argument"
30 if [ "$0" = "rename" -a -z "$new_name" ]; then
31 echo "Missing OS API Argument"