2 # Filename: /etc/grml/fai/config/hooks/instsoft.GRML
3 # Purpose: grml specific Debian installation in the chroot
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2 or any later version.
7 # Latest change: Sat Oct 27 02:15:35 CEST 2007 [mika]
8 ################################################################################
13 if [ "$FAI_ACTION" = "softupdate" ] ; then
15 # make sure we prefer grml repository:
16 if [ -r /etc/grml/fai/apt/preferences ] ; then
17 cp /etc/grml/fai/apt/preferences $target/etc/apt/preferences
20 if [ -r /etc/grml/fai/apt/sources.list ] ; then
21 if [ -L $target/etc/apt/sources.list ] ; then
22 rm $target/etc/apt/sources.list
24 cp /etc/grml/fai/apt/sources.list $target/etc/apt/sources.list
27 $ROOTCMD apt-get update
29 else # no softupdate but fresh installation
31 # work around http://trac.lighttpd.net/trac/ticket/657
32 # should be removed later on:
33 echo "Acquire::http::Pipeline-Depth "0"; // added by grml-live" >> $target/etc/apt/apt.conf
36 gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 || \
37 gpg --keyserver blackhole.pca.dfn.de --recv-keys F61E2E7CECDEA787
38 gpg --export F61E2E7CECDEA787 > $target/etc/apt/grml.key
39 $ROOTCMD apt-key add /etc/apt/grml.key
41 # make sure we prefer grml repository:
42 if [ -r /etc/grml/fai/files/etc/apt/preferences ] ; then
43 cp /etc/grml/fai/apt/preferences $target/etc/apt/preferences
46 # make sure we have file-rc available before
47 # package_config/GRML is being executed:
48 $ROOTCMD apt-get update
49 $ROOTCMD aptitude -f -y install file-rc
51 # Workaround #443481 of snort for Debian/etch:
52 mkdir -p $target/etc/snort
53 echo 'LOGDIR=/var/log/snort' >> $target/etc/snort/snort.common.parameters
55 # we definitely don't want to fail running fai dirinstall just
56 # because of some well known bugs:
57 [ -d $target/etc/apt/apt.conf.d ] || mkdir $target/etc/apt/apt.conf.d
58 cat > $target/etc/apt/apt.conf.d/10apt-listbugs << EOF
59 // Check all packages whether they has critical bugs before they are installed.
60 // If you don't like it, comment it out.
61 //DPkg::Pre-Install-Pkgs {"/usr/sbin/apt-listbugs apt || exit 10"};
62 //DPkg::Tools::Options::/usr/sbin/apt-listbugs "";
63 //DPkg::Tools::Options::/usr/sbin/apt-listbugs::Version "2";
66 # make sure /dev/MAKEDEV is available:
67 if [ -x "$target"/sbin/MAKEDEV ] && ! [ -r "$target"/dev/MAKEDEV ] ; then
68 ln -s /sbin/MAKEDEV "$target"/dev/MAKEDEV
71 # we don't need the invoke-rc.d.d diversion (we have grml-policyrcd :)):
72 if [ -L "$target"/usr/sbin/invoke-rc.d ] ; then
73 rm -f "$target"/usr/sbin/invoke-rc.d
74 $ROOTCMD dpkg-divert --package fai --rename --remove /usr/sbin/invoke-rc.d
77 fi # end of FAI_ACTION = softupdate
79 ## END OF FILE #################################################################
80 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3