[Fusionforge-commits] r10894 - trunk/tests/openvz

Christian Bayle cbayle at libremir.placard.fr.eu.org
Fri Oct 8 13:45:14 CEST 2010


Author: cbayle
Date: 2010-10-08 13:45:13 +0200 (Fri, 08 Oct 2010)
New Revision: 10894

Modified:
   trunk/tests/openvz/Makefile
Log:
Rename some var to be more comprehensive


Modified: trunk/tests/openvz/Makefile
===================================================================
--- trunk/tests/openvz/Makefile	2010-10-08 10:13:41 UTC (rev 10893)
+++ trunk/tests/openvz/Makefile	2010-10-08 11:45:13 UTC (rev 10894)
@@ -3,10 +3,10 @@
 RINSECONF=/etc/rinse/rinse.conf
 RINSEBPI=
 RINSEPOSTINST=--after-post-install $(CURDIR)/local.rinse.api
-VEIDDEB=100
-VEIDCEN=101
-VEIDDEBTMPL=105
-VEIDCENTOSTMPL=110
+VEIDDEBTEMP=100
+VEIDCENTEMP=101
+VEIDDEB=105
+VEIDCEN=110
 ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 DIST=squeeze
 EXTRADEBPACKAGE=--include=ssh,less,htop,zsh
@@ -25,6 +25,7 @@
 
 IPCENTOSBASE=192.168.222
 IPCENTOSDNS=192.168.222.1
+# Default config
 
 # Local customization can be done using a local.<hostname> file
 # This is convenient if you use local mirror
@@ -35,76 +36,76 @@
 	@echo "Available targets are:"
 	@echo " make net : this will setup a /etc/vz/vznet.conf to register new virtual host to vmbr0 bridge"
 	@echo "  See interfaces.sample to know how to setup a bridge"
-	@echo " make builddebiantemplate : build an openvz debian template"
-	@echo " make buildcentostemplate : build an openvz centos template"
+	@echo " make builddebiantemplate : build an openvz debian template (uses VEIDDEBTEMP=$(VEIDDEBTEMP))"
+	@echo " make buildcentostemplate : build an openvz centos template (uses VEIDCENTEMP=$(VEIDCENTEMP))"
 	@echo ""
-	@echo " make createdeb   : build a debian openvz vm with ID=$(VEIDDEBTMPL) from the debian template"
-	@echo " make netdhcpdeb  : set dhcp network for debian openvz vm with ID=$(VEIDDEBTMPL)"
-	@echo " make netstaticdeb: set static network for debian openvz vm with ID=$(VEIDDEBTMPL)"
+	@echo " make createdeb   : build a debian openvz vm with ID=$(VEIDDEB) from the debian template"
+	@echo " make netdhcpdeb  : set dhcp network for debian openvz vm with ID=$(VEIDDEB)"
+	@echo " make netstaticdeb: set static network for debian openvz vm with ID=$(VEIDDEB)"
 	@echo ""
-	@echo " make createcentos   : build a centos openvz vm with ID=$(VEIDCENTOSTMPL) from the centos template"
-	@echo " make netdhcpcentos  : set dhcp network for centos openvz vm with ID=$(VEIDCENTOSTMPL)"
-	@echo " make netstaticcentos: set static network for centos openvz vm with ID=$(VEIDCENTOSTMPL)"
+	@echo " make createcentos   : build a centos openvz vm with ID=$(VEIDCEN) from the centos template"
+	@echo " make netdhcpcentos  : set dhcp network for centos openvz vm with ID=$(VEIDCEN)"
+	@echo " make netstaticcentos: set static network for centos openvz vm with ID=$(VEIDCEN)"
 	@echo ""
 	@echo "Read Makefile for other targets"
 
 builddebiantemplate: beroot builddebianvm
-	$(VZCTL) set $(VEIDDEB) --ostemplate debian-$(DEBVERS) --applyconfig basic --save
+	$(VZCTL) set $(VEIDDEBTEMP) --ostemplate debian-$(DEBVERS) --applyconfig basic --save
 	# remove host keys
-	#rm $(VZPRIVATEDIR)/$(VEIDDEB)/etc/ssh/ssh_host_*
+	#rm $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/ssh/ssh_host_*
 	# Disable getty in /etc/inittab as openvz do not have that.
-	[ ! -f $(VZPRIVATEDIR)/$(VEIDDEB)/etc/inittab ] || (grep -q getty $(VZPRIVATEDIR)/$(VEIDDEB)/etc/inittab || \
-		sed -i -e '/getty/d' $(VZPRIVATEDIR)/$(VEIDDEB)/etc/inittab)
+	[ ! -f $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/inittab ] || (grep -q getty $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/inittab || \
+		sed -i -e '/getty/d' $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/inittab)
 	# Link /etc/mtab to /proc/mtab to make mount work as expected.
-	rm -f $(VZPRIVATEDIR)/$(VEIDDEB)/etc/mtab
-	ln -s /proc/mounts $(VZPRIVATEDIR)/$(VEIDDEB)/etc/mtab
+	rm -f $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/mtab
+	ln -s /proc/mounts $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/mtab
 	# LocalTime
-	#ln -sf /usr/share/zoneinfo/Europe/Paris $(VZPRIVATEDIR)/$(VEIDDEB)/etc/localtime
+	#ln -sf /usr/share/zoneinfo/Europe/Paris $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/localtime
 	# Remove hostname
-	[ ! -f $(VZPRIVATEDIR)/$(VEIDDEB)/etc/hostname ] || rm $(VZPRIVATEDIR)/$(VEIDDEB)/etc/hostname
+	[ ! -f $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/hostname ] || rm $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/hostname
 	#
-	[ -c $(VZPRIVATEDIR)/$(VEIDDEB)/dev/ptmx ] || chroot $(VZPRIVATEDIR)/$(VEIDDEB) /bin/mknod /dev/ptmx c 5 2
-	cd $(VZPRIVATEDIR)/$(VEIDDEB)/ ; tar --numeric-owner -zcf $(VZTEMPLATEDIR)/cache/debian-$(DEBVERS)-$(ARCH)-minimal.tar.gz .
+	[ -c $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/dev/ptmx ] || chroot $(VZPRIVATEDIR)/$(VEIDDEBTEMP) /bin/mknod /dev/ptmx c 5 2
+	cd $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/ ; tar --numeric-owner -zcf $(VZTEMPLATEDIR)/cache/debian-$(DEBVERS)-$(ARCH)-minimal.tar.gz .
 
 buildcentostemplate: beroot buildcentosvm
-	$(VZCTL) set $(VEIDCEN) --ostemplate centos-$(CENTVERS) --applyconfig basic --save
-	#rm $(VZPRIVATEDIR)/$(VEIDCEN)/etc/ssh/ssh_host_*
+	$(VZCTL) set $(VEIDCENTEMP) --ostemplate centos-$(CENTVERS) --applyconfig basic --save
+	#rm $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/ssh/ssh_host_*
 	# Disable getty in /etc/inittab as openvz do not have that.
-	[ ! -f $(VZPRIVATEDIR)/$(VEIDCEN)/etc/inittab ] || (grep -q getty $(VZPRIVATEDIR)/$(VEIDCEN)/etc/inittab || \
-		sed -i -e '/getty/d' $(VZPRIVATEDIR)/$(VEIDCEN)/etc/inittab)
+	[ ! -f $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/inittab ] || (grep -q getty $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/inittab || \
+		sed -i -e '/getty/d' $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/inittab)
 	# Don't start_udev
-	sed -i -e '/start_udev/d' $(VZPRIVATEDIR)/$(VEIDCEN)/etc/rc.d/rc.sysinit
+	sed -i -e '/start_udev/d' $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/rc.d/rc.sysinit
 	# Link /etc/mtab to /proc/mtab to make mount work as expected.
-	rm -f $(VZPRIVATEDIR)/$(VEIDCEN)/etc/mtab
-	ln -s /proc/mounts $(VZPRIVATEDIR)/$(VEIDCEN)/etc/mtab
+	rm -f $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/mtab
+	ln -s /proc/mounts $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/mtab
 	# LocalTime
-	#ln -sf /usr/share/zoneinfo/Europe/Paris $(VZPRIVATEDIR)/$(VEIDCEN)/etc/localtime
+	#ln -sf /usr/share/zoneinfo/Europe/Paris $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/localtime
 	# Remove hostname
-	[ ! -f $(VZPRIVATEDIR)/$(VEIDCEN)/etc/hostname ] || rm $(VZPRIVATEDIR)/$(VEIDCEN)/etc/hostname
+	[ ! -f $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/hostname ] || rm $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/hostname
 	#
-	[ -c $(VZPRIVATEDIR)/$(VEIDCEN)/dev/ptmx ]     || chroot $(VZPRIVATEDIR)/$(VEIDCEN) /bin/mknod /dev/ptmx c 5 2
-	[ -d $(VZPRIVATEDIR)/$(VEIDCEN)/dev/pts ]      || chroot $(VZPRIVATEDIR)/$(VEIDCEN) /bin/mkdir /dev/pts
-	[ -c $(VZPRIVATEDIR)/$(VEIDCEN)/vz/private/50/dev/ttyp ] || chroot $(VZPRIVATEDIR)/$(VEIDCEN) /sbin/MAKEDEV -d /vz/private/50/dev ttyp ptyp
-	-rm -f $(VZPRIVATEDIR)/$(VEIDCEN)/dev/null
-	[ -c $(VZPRIVATEDIR)/$(VEIDCEN)/dev/null ]     || chroot $(VZPRIVATEDIR)/$(VEIDCEN) /bin/mknod /dev/null c 1 3
-	[ -c $(VZPRIVATEDIR)/$(VEIDCEN)/dev/random ]   || chroot $(VZPRIVATEDIR)/$(VEIDCEN) /bin/mknod -m 644 /dev/random c 1 8
-	-rm -f $(VZPRIVATEDIR)/$(VEIDCEN)/dev/urandom 
-	[ -c $(VZPRIVATEDIR)/$(VEIDCEN)/dev/urandom ]  || chroot $(VZPRIVATEDIR)/$(VEIDCEN) /bin/mknod /dev/urandom c 1 9 
-	[ -d $(VZPRIVATEDIR)/$(VEIDCEN)/var/lock/rpm ] || chroot $(VZPRIVATEDIR)/$(VEIDCEN) /bin/mkdir /var/lock/rpm	
-	touch $(VZPRIVATEDIR)/$(VEIDCEN)/etc/fstab
-	grep -q devpts $(VZPRIVATEDIR)/$(VEIDCEN)/etc/fstab || \
-		echo "none /dev/pts devpts mode=0620 0 0" >> $(VZPRIVATEDIR)/$(VEIDCEN)/etc/fstab
-	cd $(VZPRIVATEDIR)/$(VEIDCEN)/ ; tar --numeric-owner -zcf $(VZTEMPLATEDIR)/cache/centos-$(CENTVERS)-$(ARCH)-minimal.tar.gz .
+	[ -c $(VZPRIVATEDIR)/$(VEIDCENTEMP)/dev/ptmx ]     || chroot $(VZPRIVATEDIR)/$(VEIDCENTEMP) /bin/mknod /dev/ptmx c 5 2
+	[ -d $(VZPRIVATEDIR)/$(VEIDCENTEMP)/dev/pts ]      || chroot $(VZPRIVATEDIR)/$(VEIDCENTEMP) /bin/mkdir /dev/pts
+	[ -c $(VZPRIVATEDIR)/$(VEIDCENTEMP)/vz/private/50/dev/ttyp ] || chroot $(VZPRIVATEDIR)/$(VEIDCENTEMP) /sbin/MAKEDEV -d /vz/private/50/dev ttyp ptyp
+	-rm -f $(VZPRIVATEDIR)/$(VEIDCENTEMP)/dev/null
+	[ -c $(VZPRIVATEDIR)/$(VEIDCENTEMP)/dev/null ]     || chroot $(VZPRIVATEDIR)/$(VEIDCENTEMP) /bin/mknod /dev/null c 1 3
+	[ -c $(VZPRIVATEDIR)/$(VEIDCENTEMP)/dev/random ]   || chroot $(VZPRIVATEDIR)/$(VEIDCENTEMP) /bin/mknod -m 644 /dev/random c 1 8
+	-rm -f $(VZPRIVATEDIR)/$(VEIDCENTEMP)/dev/urandom 
+	[ -c $(VZPRIVATEDIR)/$(VEIDCENTEMP)/dev/urandom ]  || chroot $(VZPRIVATEDIR)/$(VEIDCENTEMP) /bin/mknod /dev/urandom c 1 9 
+	[ -d $(VZPRIVATEDIR)/$(VEIDCENTEMP)/var/lock/rpm ] || chroot $(VZPRIVATEDIR)/$(VEIDCENTEMP) /bin/mkdir /var/lock/rpm	
+	touch $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/fstab
+	grep -q devpts $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/fstab || \
+		echo "none /dev/pts devpts mode=0620 0 0" >> $(VZPRIVATEDIR)/$(VEIDCENTEMP)/etc/fstab
+	cd $(VZPRIVATEDIR)/$(VEIDCENTEMP)/ ; tar --numeric-owner -zcf $(VZTEMPLATEDIR)/cache/centos-$(CENTVERS)-$(ARCH)-minimal.tar.gz .
 
-builddebianvm: beroot $(VZPRIVATEDIR)/$(VEIDDEB)/tmp/vzdebvm
+builddebianvm: beroot $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/tmp/vzdebvm
 
-$(VZPRIVATEDIR)/$(VEIDDEB)/tmp/vzdebvm:
-	[ -d $(VZPRIVATEDIR)/$(VEIDDEB)/tmp/vzdebvm ] || ($(DEBOOTSTRAP) --arch $(ARCH) $(EXTRADEBPACKAGE) $(DIST) $(VZPRIVATEDIR)/$(VEIDDEB) $(DEBMIRROR) && touch $(VZPRIVATEDIR)/$(VEIDDEB)/tmp/vzdebvm)
+$(VZPRIVATEDIR)/$(VEIDDEBTEMP)/tmp/vzdebvm:
+	[ -d $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/tmp/vzdebvm ] || ($(DEBOOTSTRAP) --arch $(ARCH) $(EXTRADEBPACKAGE) $(DIST) $(VZPRIVATEDIR)/$(VEIDDEBTEMP) $(DEBMIRROR) && touch $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/tmp/vzdebvm)
 
-buildcentosvm: beroot $(VZPRIVATEDIR)/$(VEIDCEN)/tmp/vzcentvm
+buildcentosvm: beroot $(VZPRIVATEDIR)/$(VEIDCENTEMP)/tmp/vzcentvm
 
-$(VZPRIVATEDIR)/$(VEIDCEN)/tmp/vzcentvm:
-	[ -d $(VZPRIVATEDIR)/$(VEIDCEN)/tmp/vzcentvm ] || ($(RINSE) $(RINSEBPI) $(RINSEPOSTINST) --config $(RINSECONF) --arch $(ARCH) --distribution centos-5 --directory $(VZPRIVATEDIR)/$(VEIDCEN) && touch $(VZPRIVATEDIR)/$(VEIDCEN)/tmp/vzcentvm)
+$(VZPRIVATEDIR)/$(VEIDCENTEMP)/tmp/vzcentvm:
+	[ -d $(VZPRIVATEDIR)/$(VEIDCENTEMP)/tmp/vzcentvm ] || ($(RINSE) $(RINSEBPI) $(RINSEPOSTINST) --config $(RINSECONF) --arch $(ARCH) --distribution centos-5 --directory $(VZPRIVATEDIR)/$(VEIDCENTEMP) && touch $(VZPRIVATEDIR)/$(VEIDCENTEMP)/tmp/vzcentvm)
 
 cleanvz:
 	[ ! -d $(VZPRIVATEDIR)/$(VEID) ] || $(VZCTL) stop $(VEID)
@@ -112,43 +113,43 @@
 	-rm -f /etc/vz/conf/$(VEID).conf.destroyed
 
 cleancentos: beroot
-	make cleanvz VEID=$(VEIDCENTOSTMPL)
+	make cleanvz VEID=$(VEIDCEN)
 	
 cleandeb: beroot
-	make cleanvz VEID=$(VEIDDEBTMPL)
+	make cleanvz VEID=$(VEIDDEB)
 
 finalizedeb: beroot
 	# Give it a hostname.
-	echo `hostname`-$(VEIDDEBTMPL) > $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/hostname
+	echo `hostname`-$(VEIDDEB) > $(VZPRIVATEDIR)/$(VEIDDEB)/etc/hostname
 	# Disable getty in /etc/inittab as openvz do not have that.
-	sed -i -e '/getty/d' $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/inittab
+	sed -i -e '/getty/d' $(VZPRIVATEDIR)/$(VEIDDEB)/etc/inittab
 	# Link /etc/mtab to /proc/mtab to make mount work as expected.
-	rm -f $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/mtab
-	ln -s /proc/mounts $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/mtab
+	rm -f $(VZPRIVATEDIR)/$(VEIDDEB)/etc/mtab
+	ln -s /proc/mounts $(VZPRIVATEDIR)/$(VEIDDEB)/etc/mtab
 	# If an IP address is needed for the virtual server
-	#$(VZCTL) set $(VEIDDEBTMPL) --ipadd x.x.x.x --save
+	#$(VZCTL) set $(VEIDDEB) --ipadd x.x.x.x --save
 	# In that case you also need to enable IP forwarding
 	#sysctl -w net.ipv4.ip_forward=1
 
 netdhcpdeb: beroot
 	# Add eth0 interface
-	$(VZCTL) set $(VEIDDEBTMPL) --netif_add eth0 --save
+	$(VZCTL) set $(VEIDDEB) --netif_add eth0 --save
 	# Setup dhcp
-	grep -q "auto lo" $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/network/interfaces || \
-		echo "auto lo" >> $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/network/interfaces
-	grep -q "iface lo inet loopback" $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/network/interfaces || \
-		echo "iface lo inet loopback" >> $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/network/interfaces
-	grep -q "auto eth0" $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/network/interfaces || \
-		echo "auto eth0" >> $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/network/interfaces
-	grep -q "iface eth0 inet dhcp" $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/network/interfaces || \
-		echo "iface eth0 inet dhcp" >> $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/network/interfaces
+	grep -q "auto lo" $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces || \
+		echo "auto lo" >> $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces
+	grep -q "iface lo inet loopback" $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces || \
+		echo "iface lo inet loopback" >> $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces
+	grep -q "auto eth0" $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces || \
+		echo "auto eth0" >> $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces
+	grep -q "iface eth0 inet dhcp" $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces || \
+		echo "iface eth0 inet dhcp" >> $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces
 	# Setup dhclient extra
-	grep -q "^send host-name" $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/dhcp/dhclient.conf || \
-		echo "send host-name \"`hostname`-$(VEIDDEBTMPL)\";" >> $(VZPRIVATEDIR)/$(VEIDDEBTMPL)/etc/dhcp/dhclient.conf
+	grep -q "^send host-name" $(VZPRIVATEDIR)/$(VEIDDEB)/etc/dhcp/dhclient.conf || \
+		echo "send host-name \"`hostname`-$(VEIDDEB)\";" >> $(VZPRIVATEDIR)/$(VEIDDEB)/etc/dhcp/dhclient.conf
 
 netstaticdeb: beroot
-	$(VZCTL) set $(VEIDDEBTMPL) --ipadd $(IPDEBBASE).$(VEIDDEBTMPL) --save
-	$(VZCTL) set $(VEIDDEBTMPL) --nameserver $(IPDEBDNS) --save
+	$(VZCTL) set $(VEIDDEB) --ipadd $(IPDEBBASE).$(VEIDDEB) --save
+	$(VZCTL) set $(VEIDDEB) --nameserver $(IPDEBDNS) --save
 	sysctl -w net.ipv4.ip_forward=1
 	sysctl -w net.ipv4.conf.default.forwarding=1
 	sysctl -w net.ipv4.conf.default.proxy_arp=0
@@ -157,25 +158,25 @@
 
 finalizecentos: beroot
 	# Give it a hostname.
-	echo `hostname`-$(VEIDCENTOSTMPL) > $(VZPRIVATEDIR)/$(VEIDCENTOSTMPL)/etc/hostname
-	touch $(VZPRIVATEDIR)/$(VEIDCENTOSTMPL)/etc/sysconfig/network
-	grep -q "^HOSTNAME=" $(VZPRIVATEDIR)/$(VEIDCENTOSTMPL)/etc/sysconfig/network || \
-		echo "HOSTNAME=`hostname`-$(VEIDCENTOSTMPL)" >> $(VZPRIVATEDIR)/$(VEIDCENTOSTMPL)/etc/sysconfig/network
+	echo `hostname`-$(VEIDCEN) > $(VZPRIVATEDIR)/$(VEIDCEN)/etc/hostname
+	touch $(VZPRIVATEDIR)/$(VEIDCEN)/etc/sysconfig/network
+	grep -q "^HOSTNAME=" $(VZPRIVATEDIR)/$(VEIDCEN)/etc/sysconfig/network || \
+		echo "HOSTNAME=`hostname`-$(VEIDCEN)" >> $(VZPRIVATEDIR)/$(VEIDCEN)/etc/sysconfig/network
 
 netdhcpcentos: beroot
 	# Add eth0 interface
-	$(VZCTL) set $(VEIDCENTOSTMPL) --netif_add eth0 --save
+	$(VZCTL) set $(VEIDCEN) --netif_add eth0 --save
 	# Setup dhcp
-	echo "DEVICE=eth0" > $(VZPRIVATEDIR)/$(VEIDCENTOSTMPL)/etc/sysconfig/network-scripts/ifcfg-eth0
-	echo "BOOTPROTO=dhcp" >> $(VZPRIVATEDIR)/$(VEIDCENTOSTMPL)/etc/sysconfig/network-scripts/ifcfg-eth0
-	echo "ONBOOT=yes" >> $(VZPRIVATEDIR)/$(VEIDCENTOSTMPL)/etc/sysconfig/network-scripts/ifcfg-eth0
+	echo "DEVICE=eth0" > $(VZPRIVATEDIR)/$(VEIDCEN)/etc/sysconfig/network-scripts/ifcfg-eth0
+	echo "BOOTPROTO=dhcp" >> $(VZPRIVATEDIR)/$(VEIDCEN)/etc/sysconfig/network-scripts/ifcfg-eth0
+	echo "ONBOOT=yes" >> $(VZPRIVATEDIR)/$(VEIDCEN)/etc/sysconfig/network-scripts/ifcfg-eth0
 	# Setup dhclient extra
-	[ -f $(VZPRIVATEDIR)/$(VEIDCENTOSTMPL)/etc/dhclient.conf ] || \
-		echo "send host-name \"`hostname`-$(VEIDCENTOSTMPL)\";" > $(VZPRIVATEDIR)/$(VEIDCENTOSTMPL)/etc/dhclient.conf
+	[ -f $(VZPRIVATEDIR)/$(VEIDCEN)/etc/dhclient.conf ] || \
+		echo "send host-name \"`hostname`-$(VEIDCEN)\";" > $(VZPRIVATEDIR)/$(VEIDCEN)/etc/dhclient.conf
 	
 netstaticcentos: beroot
-	$(VZCTL) set $(VEIDCENTOSTMPL) --ipadd $(IPCENTOSBASE).$(VEIDCENTOSTMPL) --save
-	$(VZCTL) set $(VEIDCENTOSTMPL) --nameserver $(IPCENTOSDNS) --save
+	$(VZCTL) set $(VEIDCEN) --ipadd $(IPCENTOSBASE).$(VEIDCEN) --save
+	$(VZCTL) set $(VEIDCEN) --nameserver $(IPCENTOSDNS) --save
 	sysctl -w net.ipv4.ip_forward=1
 	sysctl -w net.ipv4.conf.default.forwarding=1
 	sysctl -w net.ipv4.conf.default.proxy_arp=0
@@ -195,11 +196,11 @@
 	#sudo brctl addif vmbr0 eth0
 
 createdeb: beroot cleandeb
-	$(VZCTL) create $(VEIDDEBTMPL) --private $(VZPRIVATEDIR)/$(VEIDDEBTMPL) --ostemplate debian-$(DEBVERS)-$(ARCH)-minimal
+	$(VZCTL) create $(VEIDDEB) --private $(VZPRIVATEDIR)/$(VEIDDEB) --ostemplate debian-$(DEBVERS)-$(ARCH)-minimal
 	make finalizedeb
 	
 createcentos: beroot cleancentos
-	$(VZCTL) create $(VEIDCENTOSTMPL) --private $(VZPRIVATEDIR)/$(VEIDCENTOSTMPL) --ostemplate centos-$(CENTVERS)-$(ARCH)-minimal
+	$(VZCTL) create $(VEIDCEN) --private $(VZPRIVATEDIR)/$(VEIDCEN) --ostemplate centos-$(CENTVERS)-$(ARCH)-minimal
 	make finalizecentos
 	
 beroot:




More information about the Fusionforge-commits mailing list