1
0
mirror of synced 2026-05-05 07:43:42 +00:00

2006-03-11 19:45:50 by steve

Add 'vif='[ip=xxx]' to the Xen configuration file if the address is
 static.

  Added test case to make sure this works.
This commit is contained in:
steve
2006-03-11 19:45:51 +00:00
parent 6ff9a3be7b
commit 011fb4345f
2 changed files with 135 additions and 4 deletions

View File

@@ -1,9 +1,21 @@
#!/bin/sh -x
#!/bin/sh
#
# This script is responsible for setting up the Xen Configuration file
prefix=$1
#
# Useful hook for testing.
#
output_dir=/etc/xen
if [ "${testing}" ]; then
if [ -d ${testing_dir} ]; then
output_dir=${testing_dir}
fi
fi
#
# Make sure we use ide style device names if required
#
@@ -13,17 +25,18 @@ if [ "${use-ide}" ]; then
fi
if [ "${dhcp}" ]; then
dyn='dhcp = "dhcp"'
dyn='dhcp = "dhcp"'
else
dyn="vif = ['ip=${ip}']"
fi
echo "Creating Xen configuration file in /etc/xen .. "
cat <<E_O_CFG > /etc/xen/${hostname}.cfg
cat <<E_O_CFG > ${output_dir}/${hostname}.cfg
kernel = '${kernel}'
memory = ${memory}
name = '${hostname}'
root = '/dev/${device}1 ro'
vif = ['']
disk = [ '$image_vbd,${device}1,w', '$swap_vbd,${device}2,w' ]
${dyn}