1
0
mirror of synced 2026-01-28 20:31:03 +00:00

2006-03-08 18:37:01 by radu

Moved Xen configuration file creation in a hook
This commit is contained in:
radu
2006-03-08 18:37:02 +00:00
parent 561aacb3b8
commit 84de085a51
2 changed files with 38 additions and 35 deletions

34
etc/hook.d/95-create-cfg Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/sh -x
#
# This script is responsible for setting up the Xen Configuration file
#prefix=$1
kernel="kern"
memory=512
hostname="aiurea"
#
# Make sure we use ide style device names if required
#
device=sda
if [ "${use-ide}" ]; then
device=hda
fi
if [ "${dhcp}" ]; then
dyn='dhcp = "dhcp"'
fi
echo "Creating Xen configuration file in /etc/xen .. "
cat <<E_O_CFG > /etc/xen/${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}
E_O_CFG