diff options
Diffstat (limited to 'buildconfigs/enable-xen-config')
-rw-r--r-- | buildconfigs/enable-xen-config | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/buildconfigs/enable-xen-config b/buildconfigs/enable-xen-config new file mode 100644 index 0000000000..b427a12d90 --- /dev/null +++ b/buildconfigs/enable-xen-config @@ -0,0 +1,36 @@ +#!/bin/sh + +set -ex + +if [ $# -ne 1 ] ; then + echo "Usage $(basename $0) <config-file>" 1>&2 + exit 1 +fi + +CONFIG=$1 + +setopt() +{ + OPTION=$1 + VALUE=$2 + + # First remove any existing instances of this option + sed -e "s/^# ${OPTION} is not set$//g ; s/^^{OPTION}=.$//g" -i "${CONFIG}" + + # Then append the new value + case ${VALUE} in + y|m) echo "${OPTION}=${VALUE}" >> "${CONFIG}" ;; + n) echo "# ${OPTION} is not set" >> "${CONFIG}" ;; + *) echo "Invalid value ${VALUE} for ${OPTION}" 1>&2 ; exit 1 ;; + esac +} + +setopt CONFIG_PARAVIRT y +setopt CONFIG_XEN y +setopt CONFIG_VMI y +setopt CONFIG_LGUEST n +setopt CONFIG_XEN_BLKDEV_FRONTEND y +setopt CONFIG_XEN_NETDEV_FRONTEND y +setopt CONFIG_HVC_XEN y + +exit 0 |