2 # Copyright © 2008-2009 Andres Salomon <dilinger@collabora.co.uk>
4 # This file is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 customize_chroot_hook()
22 # Any customizations that need to be made to the chroot after the base system
23 # has been installed (but prior to custom package installation) should be
24 # put here. $ROOT_DIR should be prefixed to any paths.
26 # OFW needs this to boot w/ partitions
27 ln -s . ${ROOT_DIR}/boot/boot
29 # XOs are slow and small; don't use pdiffs and don't install recommends
30 cat >${ROOT_DIR}/etc/apt/apt.conf<<EOF
31 Acquire::Pdiffs "false";
32 APT::Install-Recommends "false";
36 package_configure_hook()
40 # Any customizations that need to be made after all packages have been
41 # installed should be put here. $ROOT_DIR should be prefixed to any
45 # Ensure certain modules get loaded during boot
46 cat >>${ROOT_DIR}/etc/modules<<EOF
57 cat >>${ROOT_DIR}/etc/initramfs-tools/modules<<EOF
61 # install some custom packages that aren't on mirrors. ugly hack!
62 k="http://lunge.mit.edu/~dilinger/debxo-0.2/ofw-config_0.1_all.deb
63 http://lunge.mit.edu/~dilinger/debxo-0.6/linux-image-2.6.37-rc1+_2.6.37-rc1+-47_i386.deb"
67 wget --continue -O cache/${pkg} ${i}
68 cp cache/${pkg} ${ROOT_DIR}/${pkg}
69 (chroot ${ROOT_DIR} dpkg -i /${pkg})
70 pkgbase=$(echo $pkg | cut -d_ -f1)
71 echo $pkgbase hold | (chroot ${ROOT_DIR} dpkg --set-selections)
72 rm -f ${ROOT_DIR}/${pkg}
75 # No longer a need for xorg.conf
76 rm -f ${ROOT_DIR}/etc/X11/xorg.conf
79 if [ -d ${ROOT_DIR}/etc/kde3/kdm ]; then
80 sed --in-place "s/AllowNullPasswd=false/AllowNullPasswd=true/;s/#AutoLoginEnable=true/AutoLoginEnable=true/;s/#AutoLoginUser=fred/AutoLoginUser=${DEFUSER}/" ${ROOT_DIR}/etc/kde3/kdm/kdmrc
89 # Any customizations that need to be made after the chroot creation is
90 # complete should be put here. $ROOT_DIR should be prefixed to any