]> spindle.queued.net Git - xodist/blob - configs/debian-lenny-i386/hooks
mkchroot: add a debian-lenny-i386 image
[xodist] / configs / debian-lenny-i386 / hooks
1 # Default hooks - copy & customize this for a new image build
2 #
3 # Copyright © 2008-2009  Andres Salomon <dilinger@collabora.co.uk>
4 #
5 # This file is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 # General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 customize_chroot_hook()
20 {
21         ROOT_DIR="$1"
22
23         # Any customizations that need to be made to the chroot after the base system
24         # has been installed (but prior to custom package installation) should be
25         # put here.  $ROOT_DIR should be prefixed to any paths.
26
27         # attempt to keep the install footprint small by not installing recommends
28         cat >${ROOT_DIR}/etc/apt/apt.conf<<EOF
29 APT::Install-Recommends "false";
30 EOF
31
32         # the kernel package's debconf handling is terrible; we need this to
33         # for its installation.
34         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" \
35                         | chroot $ROOT_DIR debconf-set-selections
36
37 }
38
39 package_configure_hook()
40 {
41         ROOT_DIR="$1"
42
43         # Any customizations that need to be made after all packages have been
44         # installed should be put here.  $ROOT_DIR should be prefixed to any
45         # paths.
46
47         # No longer a need for xorg.conf
48         rm -f ${ROOT_DIR}/etc/X11/xorg.conf
49
50 }
51
52 cleanup_chroot_hook()
53 {
54         ROOT_DIR="$1"
55
56         # Any customizations that need to be made after the chroot creation is
57         # complete should be put here.  $ROOT_DIR should be prefixed to any
58         # paths.
59
60 }