+# Default hooks - copy & customize this for a new image build
+#
+# Copyright © 2008-2009 Andres Salomon <dilinger@collabora.co.uk>
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+customize_chroot_hook()
+{
+ ROOT_DIR="$1"
+
+ # Any customizations that need to be made to the chroot after the base system
+ # has been installed (but prior to custom package installation) should be
+ # put here. $ROOT_DIR should be prefixed to any paths.
+
+ # attempt to keep the install footprint small by not installing recommends
+ cat >${ROOT_DIR}/etc/apt/apt.conf<<EOF
+APT::Install-Recommends "false";
+EOF
+
+ # the kernel package's debconf handling is terrible; we need this to
+ # for its installation.
+ echo "linux-image-2.6.26-2-686 linux-image-2.6.26-2-686/preinst/bootloader-initrd-2.6.26-2-686 boolean false" \
+ | chroot $ROOT_DIR debconf-set-selections
+
+}
+
+package_configure_hook()
+{
+ ROOT_DIR="$1"
+
+ # Any customizations that need to be made after all packages have been
+ # installed should be put here. $ROOT_DIR should be prefixed to any
+ # paths.
+
+ # No longer a need for xorg.conf
+ rm -f ${ROOT_DIR}/etc/X11/xorg.conf
+
+}
+
+cleanup_chroot_hook()
+{
+ ROOT_DIR="$1"
+
+ # Any customizations that need to be made after the chroot creation is
+ # complete should be put here. $ROOT_DIR should be prefixed to any
+ # paths.
+
+}