55# # Author: Renuka Apte <renuka.apte@citrix.com>
66# # This is not an officially supported guest OS on XenServer 6.02
77
8+ BASE_DIR=$( cd $( dirname " $0 " ) && pwd)
9+ source $BASE_DIR /../../../localrc
10+
811LENNY=$( xe template-list name-label=Debian\ Lenny\ 5.0\ \( 32-bit\) --minimal)
912
1013if [[ -z $LENNY ]] ; then
@@ -22,11 +25,21 @@ for arch in ${arches[@]} ; do
2225 if [[ -n $( xe template-list name-label=" $distro ($arch )" params=uuid --minimal) ]] ; then
2326 echo " $distro ($arch )" already exists, Skipping
2427 else
25-
28+ if [ -z $NETINSTALLIP ]
29+ then
30+ echo " NETINSTALLIP not set in localrc"
31+ exit 1
32+ fi
33+ pvargs=" -- quiet console=hvc0 partman/default_filesystem=ext3 locale=en_US console-setup/ask_detect=false keyboard-configuration/layoutcode=us netcfg/choose_interface=eth3 netcfg/get_hostname=os netcfg/get_domain=os auto url=${preseedurl} "
34+ if [ " $NETINSTALLIP " != " dhcp" ]
35+ then
36+ netcfgargs=" netcfg/disable_autoconfig=true netcfg/get_nameservers=${NAMESERVERS} netcfg/get_ipaddress=${NETINSTALLIP} netcfg/get_netmask=${NETMASK} netcfg/get_gateway=${GATEWAY} netcfg/confirm_static=true"
37+ pvargs=" ${pvargs} ${netcfgargs} "
38+ fi
2639 NEWUUID=$( xe vm-clone uuid=$LENNY new-name-label=" $distro ($arch )" )
2740 xe template-param-set uuid=$NEWUUID other-config:install-methods=http,ftp \
2841 other-config:install-repository=http://archive.ubuntu.net/ubuntu \
29- PV-args=" -- quiet console=hvc0 partman/default_filesystem=ext3 locale=en_US console-setup/ask_detect=false keyboard-configuration/layoutcode=us netcfg/choose_interface=eth3 netcfg/get_hostname=os netcfg/get_domain=os auto url= ${preseedurl} " \
42+ PV-args=" $pvargs " \
3043 other-config:debian-release=oneiric \
3144 other-config:default_template=true
3245
0 commit comments