Commit f4ded3c0 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Fix a bug introduced in 7f008dd4

The check for supported hypervisors should only executed by scripts
that comply to the ganeti api.
parent 24543571
......@@ -118,6 +118,13 @@ get_api10_arguments() {
log_error "(INSTANCE_NAME HYPERVISOR or DISK_COUNT)"
exit 1
fi
case $HYPERVISOR in
xen-hvm|xen-pvm) . xen-common.sh ;;
kvm) . kvm-common.sh ;;
*) log_error "Unsupported hypervisor: \`$HYPERVISTOR'"; exit 1;;
esac
instance=$INSTANCE_NAME
if [ $DISK_COUNT -lt 1 -o -z "$DISK_0_PATH" ]; then
log_error "At least one disk is needed"
......@@ -294,7 +301,6 @@ ganeti_os_main() {
exit 1
fi
fi
}
do_multistrap() {
......@@ -423,12 +429,6 @@ fi
: ${MULTISTRAP_CONFIG:="@MULTISTRAP_CONFIG@"}
: ${MULTISTRAP_APTPREFDIR:="@MULTISTRAP_APTPREFDIR@"}
case $HYPERVISOR in
xen-hvm|xen-pvm) . xen-common.sh ;;
kvm) . kvm-common.sh ;;
*) log_error "Unsupported hypervisor: \`$HYPERVISTOR'"; exit 1;;
esac
SCRIPT_NAME=$(basename $0)
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment