[Fai-commit] r3263 - in people/lazyboy/fai-distributions/dists: centos3 mandriva ubuntu_breezy ubuntu_hoary

fai-repository at svn.debian.org fai-repository at svn.debian.org
Mon Jan 23 20:50:17 UTC 2006


Author: lazyboy-guest
Date: 2006-01-23 20:50:16 +0000 (Mon, 23 Jan 2006)
New Revision: 3263

Modified:
   people/lazyboy/fai-distributions/dists/centos3/make-base-tgz
   people/lazyboy/fai-distributions/dists/mandriva/make-base-tgz
   people/lazyboy/fai-distributions/dists/ubuntu_breezy/make-base-tgz
   people/lazyboy/fai-distributions/dists/ubuntu_hoary/make-base-tgz
Log:
correct temporary chroot dir location and variable name

Modified: people/lazyboy/fai-distributions/dists/centos3/make-base-tgz
===================================================================
--- people/lazyboy/fai-distributions/dists/centos3/make-base-tgz	2006-01-22 22:46:03 UTC (rev 3262)
+++ people/lazyboy/fai-distributions/dists/centos3/make-base-tgz	2006-01-23 20:50:16 UTC (rev 3263)
@@ -44,16 +44,17 @@
 
 
 # FIXME: can/should probably be defined somewhere in /etc/fai?
-TMPDIR="/tmp/fai/${DISTRIBUTION}_debootstrap/"
-echo "TMPDIT is $TMPDIR"
+TMP_CHROOT_DIR=`mktemp -d /tmp/fai/${DISTRIBUTION}_debootstrap.XXXXXX`
+echo "TMPDIR is $TMP_CHROOT_DIR"
 
-rpmstrap centos3 $TMPDIR $MIRROR
+rpmstrap centos3 $TMP_CHROOT_DIR $MIRROR
 
 echo "Creating base-$DISTRIBUTION.tgz"
 
-cd $TMPDIR
+cd $TMP_CHROOT_DIR
 tar cfz $NFSROOT/var/tmp/base-$DISTRIBUTION.tgz *
 
-#chroot $TMPDIR umount /dev
-chroot $TMPDIR umount /.dev
+#chroot $TMP_CHROOT_DIR umount /dev
+chroot $TMP_CHROOT_DIR umount /.dev
  
+rm -r $TMP_CHROOT_DIR

Modified: people/lazyboy/fai-distributions/dists/mandriva/make-base-tgz
===================================================================
--- people/lazyboy/fai-distributions/dists/mandriva/make-base-tgz	2006-01-22 22:46:03 UTC (rev 3262)
+++ people/lazyboy/fai-distributions/dists/mandriva/make-base-tgz	2006-01-23 20:50:16 UTC (rev 3263)
@@ -56,17 +56,17 @@
 fi
 
 # FIXME: can/should probably be defined somewhere in /etc/fai?
-TMPDIR="/tmp/fai/${DISTRIBUTION}_debootstrap/"
-echo "TMPDIT is $TMPDIR"
+TMP_CHROOT_DIR=`mktemp -d /tmp/fai/${DISTRIBUTION}_debootstrap.XXXXXX`
+echo "TMPDIT is $TMP_CHROOT_DIR"
 
 
 # FIXME: doesn't work yet
-#rpmstrap --include=$BASE_EXTRA_PACKAGES mandriva10 $TMPDIR $MANDRIVA_MIRROR
-rpmstrap mandriva10 $TMPDIR $MANDRIVA_MIRROR
+#rpmstrap --include=$BASE_EXTRA_PACKAGES mandriva10 $TMP_CHROOT_DIR $MANDRIVA_MIRROR
+rpmstrap mandriva10 $TMP_CHROOT_DIR $MANDRIVA_MIRROR
 
 echo "Creating base-$DISTRIBUTION.tgz"
 
-cd $TMPDIR
+cd $TMP_CHROOT_DIR
 tar cfz $NFSROOT/var/tmp/base-$DISTRIBUTION.tgz *
 
-rm -r $TMPDIR
+rm -r $TMP_CHROOT_DIR

Modified: people/lazyboy/fai-distributions/dists/ubuntu_breezy/make-base-tgz
===================================================================
--- people/lazyboy/fai-distributions/dists/ubuntu_breezy/make-base-tgz	2006-01-22 22:46:03 UTC (rev 3262)
+++ people/lazyboy/fai-distributions/dists/ubuntu_breezy/make-base-tgz	2006-01-23 20:50:16 UTC (rev 3263)
@@ -57,14 +57,14 @@
 cd -
 
 # FIXME: can/should probably be defined somewhere in /etc/fai?
-TMPDIR="/tmp/fai/${DISTRIBUTION}_debootstrap/"
-echo "TMPDIT is $TMPDIR"
+TMP_CHROOT_DIR=`mktemp -d /tmp/fai/${DISTRIBUTION}_debootstrap.XXXXXX`
+echo "TMPDIT is $TMP_CHROOT_DIR"
 
 FAI_DEBOOTSTRAP_OPTIONS="--arch i386 \
     --exclude=pcmcia-cs,pppoe,dhcp-client,exim4,exim4-base,exim4-config,exim4-daemon-light,modconf,libident,exim \
     --include=lilo \
     breezy \
-    $TMPDIR \
+    $TMP_CHROOT_DIR \
     $MIRROR_LOCATION"
 
 cd `dirname $0`
@@ -74,18 +74,18 @@
 echo run $BOOTSTRAP_DIR/usr/sbin/debootstrap $FAI_DEBOOTSTRAP_OPTIONS
 $BOOTSTRAP_DIR/usr/sbin/debootstrap $FAI_DEBOOTSTRAP_OPTIONS
 
-chroot $TMPDIR apt-get clean
+chroot $TMP_CHROOT_DIR apt-get clean
        
 echo "Creating base-$DISTRIBUTION.tgz"
 
-cd $TMPDIR
+cd $TMP_CHROOT_DIR
 tar cfz $NFSROOT/var/tmp/base-$DISTRIBUTION.tgz *
 
-chroot $TMPDIR umount /dev
-chroot $TMPDIR umount /.dev
+chroot $TMP_CHROOT_DIR umount /dev
+chroot $TMP_CHROOT_DIR umount /.dev
  
 # cleanup
-echo "cleaning up TMPDIR $TMPDIR"
-rm -rf $TMPDIR
+echo "cleaning up TMP_CHROOT_DIR $TMP_CHROOT_DIR"
+rm -rf $TMP_CHROOT_DIR
 
 

Modified: people/lazyboy/fai-distributions/dists/ubuntu_hoary/make-base-tgz
===================================================================
--- people/lazyboy/fai-distributions/dists/ubuntu_hoary/make-base-tgz	2006-01-22 22:46:03 UTC (rev 3262)
+++ people/lazyboy/fai-distributions/dists/ubuntu_hoary/make-base-tgz	2006-01-23 20:50:16 UTC (rev 3263)
@@ -60,13 +60,13 @@
 
 # FIXME: can/should probably be defined somewhere in /etc/fai?
 # TODO: solve chroot deletetion problem! ubuntu-users/ubuntu-devel?
-TMPDIR=/tmp/fai/ubuntu_hoary_debootstrap/
+TMP_CHROOT_DIR=`mktemp -d /tmp/fai/${DISTRIBUTION}_debootstrap.XXXXXX`
 
 FAI_DEBOOTSTRAP_OPTIONS="--arch i386 \
     --exclude=pcmcia-cs,pppoe,dhcp-client,exim4,exim4-base,exim4-config,exim4-daemon-light,modconf,libident,exim \
     --include=lilo \
     hoary \
-    $TMPDIR \
+    $TMP_CHROOT_DIR \
     ftp://$mirrorhost/ubuntu"
 
 cd `dirname $0`
@@ -76,16 +76,16 @@
 echo run $BOOTSTRAP_DIR/usr/sbin/debootstrap $FAI_DEBOOTSTRAP_OPTIONS
 $BOOTSTRAP_DIR/usr/sbin/debootstrap $FAI_DEBOOTSTRAP_OPTIONS
 
-chroot $TMPDIR apt-get clean
+chroot $TMP_CHROOT_DIR apt-get clean
        
 echo "Creating base-$DISTRIBUTION.tgz"
 
-cd $TMPDIR
+cd $TMP_CHROOT_DIR
 tar cfz $NFSROOT/var/tmp/base-$DISTRIBUTION.tgz *
 
-chroot $TMPDIR umount /dev
-chroot $TMPDIR umount /.dev
+chroot $TMP_CHROOT_DIR umount /dev
+chroot $TMP_CHROOT_DIR umount /.dev
  
 # cleanup
-echo "cleaning up TMPDIR $TMPDIR"
-rm -rf $TMPDIR
+echo "cleaning up TMP_CHROOT_DIR $TMP_CHROOT_DIR"
+rm -rf $TMP_CHROOT_DIR




More information about the Fai-commit mailing list