cmdlib: remove usage of ENABLE_FILE_STORAGE
[ganeti-local] / devel / build_chroot
index aff8f3c..27be90f 100755 (executable)
@@ -5,7 +5,10 @@
 : ${CONF_DIR:=/etc/schroot/chroot.d}
 : ${CHROOT_DIR:=/srv/chroot}
 : ${ALTERNATIVE_EDITOR:=/usr/bin/vim.basic}
-# The value of DATA_DIR is read as well from the environment.
+: ${CHROOT_FINAL_HOOK:=/bin/true}
+# Additional Variables taken from the environmen
+# DATA_DIR
+# CHROOT_EXTRA_DEBIAN_PACKAGES    
 
 #Automatically generated variables
 CHROOTNAME=$DIST_RELEASE-$ARCH
@@ -116,7 +119,7 @@ in_chroot -- \
 
 #Install selected packages from backports
 in_chroot -- \
-  $APT_INSTALL -t squeeze-backports install \
+  $APT_INSTALL -t squeeze-backports \
     git \
     vim
 
@@ -209,10 +212,21 @@ in_chroot -- \
 in_chroot -- \
   $APT_INSTALL python-docutils debhelper quilt
 
+# extra debian packages
+
+for package in $CHROOT_EXTRA_DEBIAN_PACKAGES
+do in_chroot -- \
+  $APT_INSTALL $package
+done
+
 #Set default editor
 in_chroot -- \
   update-alternatives --set editor $ALTERNATIVE_EDITOR
 
+# Final user hook
+
+in_chroot -- $CHROOT_FINAL_HOOK
+
 rm -f $COMP_FILEPATH
 echo "Creating compressed schroot image..."
 cd $CHDIR