[Fai-commit] r6277 - trunk/examples/simple/basefiles

Michael Goetze mgoetze-guest at alioth.debian.org
Mon Feb 7 14:54:02 UTC 2011


Author: mgoetze-guest
Date: 2011-02-07 14:53:55 +0000 (Mon, 07 Feb 2011)
New Revision: 6277

Modified:
   trunk/examples/simple/basefiles/Makefile
Log:
basefiles/Makefile: use mktemp, s/-/_/ in class names.

Modified: trunk/examples/simple/basefiles/Makefile
===================================================================
--- trunk/examples/simple/basefiles/Makefile	2011-02-07 13:19:10 UTC (rev 6276)
+++ trunk/examples/simple/basefiles/Makefile	2011-02-07 14:53:55 UTC (rev 6277)
@@ -5,12 +5,15 @@
 # This Makefile can build .tar.xz and .tar.gz basefiles for:
 # Debian GNU/Linux 6.0 (SQUEEZE32, SQUEEZE64)
 # Ubuntu 10.04 (LUCID32, LUCID64)
-# CentOS 5 (CENTOS5-32, CENTOS5-64)
+# CentOS 5 (CENTOS5_32, CENTOS5_64)
 #
 # Packages you might want to install to use this Makefile:
 # debootstrap, rinse, xz-utils
 
-TMPDIR=/tmp/debootstrap-fai
+ifndef TMPDIR
+TMPDIR:=$(shell mktemp -d /tmp/basefiles.XXXXXXXX)
+endif
+export TMPDIR
 MIRROR_DEBIAN=http://cdn.debian.net/debian/
 MIRROR_UBUNTU=http://ftp.halifax.rwth-aachen.de/ubuntu/
 #MIRROR_CENTOS=http://mirror.netcologne.de/centos/
@@ -25,12 +28,10 @@
 .PHONY: check cleanup-deb cleanup-rinse all32 all64 all
 
 check::
-	@if [ -d ${TMPDIR} ]; then echo "${TMPDIR} already exists, aborting."; exit 1; fi
 	@if [ `id -u` != 0 ]; then echo "You must be root to create chroots."; exit 1; fi
-	@mkdir -p ${TMPDIR}
-	@mknod "${TMPDIR}/test-dev-null" c 1 3 || (echo "Cannot create device files on ${TMPDIR}, aborting."; rm -rf ${TMPDIR}; exit 1)
-	@echo test > "${TMPDIR}/test-dev-null" || (echo "Cannot use device files on ${TMPDIR}, aborting."; rm -rf ${TMPDIR}; exit 1)
-	@rm -f "${TMPDIR}/test-dev-null"
+	@mknod ${TMPDIR}/test-dev-null c 1 3 || (echo "Cannot create device files on ${TMPDIR}, aborting."; rm -rf ${TMPDIR}; exit 1)
+	@echo test > ${TMPDIR}/test-dev-null || (echo "Cannot use device files on ${TMPDIR}, aborting."; rm -rf ${TMPDIR}; exit 1)
+	@rm -f ${TMPDIR}/test-dev-null
 
 cleanup-deb::
 	chroot ${TMPDIR} aptitude clean
@@ -43,25 +44,25 @@
 	rm ${TMPDIR}/etc/resolv.conf
 	cp ${TMPDIR}/etc/modprobe.d/modprobe.conf.dist ${TMPDIR}/etc/modprobe.conf
 
-CENTOS5-32.tar.xz: check
+CENTOS5_32.tar.xz: check
 	linux32 rinse --directory ${TMPDIR} ${RINSEOPT_CENTOS} --arch i386
 	$(MAKE) cleanup-rinse
 	tar --one-file-system -C ${TMPDIR} -cf - . | ${XZ} > $@
 	rm -rf ${TMPDIR}
 
-CENTOS5-32.tar.gz: check
+CENTOS5_32.tar.gz: check
 	linux32 rinse --directory ${TMPDIR} ${RINSEOPT_CENTOS} --arch i386
 	$(MAKE) cleanup-rinse
 	tar --one-file-system -C ${TMPDIR} -cf - . | ${GZ} > $@
 	rm -rf ${TMPDIR}
 
-CENTOS5-64.tar.xz: check
+CENTOS5_64.tar.xz: check
 	rinse --directory ${TMPDIR} ${RINSEOPT_CENTOS} --arch amd64
 	$(MAKE) cleanup-rinse
 	tar --one-file-system -C ${TMPDIR} -cf - . | ${XZ} > $@
 	rm -rf ${TMPDIR}
 
-CENTOS5-64.tar.gz: check
+CENTOS5_64.tar.gz: check
 	rinse --directory ${TMPDIR} ${RINSEOPT_CENTOS} --arch amd64
 	$(MAKE) cleanup-rinse
 	tar --one-file-system -C ${TMPDIR} -cf - . | ${GZ} > $@
@@ -115,8 +116,8 @@
 	tar --one-file-system -C ${TMPDIR} -cf - . | ${GZ} > $@ 
 	rm -rf ${TMPDIR}
 
-all32: CENTOS5-32.tar.xz LUCID32.tar.xz SQUEEZE32.tar.xz
+all32: CENTOS5_32.tar.xz LUCID32.tar.xz SQUEEZE32.tar.xz
 
-all64: CENTOS5-64.tar.xz LUCID64.tar.xz SQUEEZE64.tar.xz
+all64: CENTOS5_64.tar.xz LUCID64.tar.xz SQUEEZE64.tar.xz
 
 all: all32 all64




More information about the Fai-commit mailing list