Drop class SID and try to workaround #443481 via /etc/snort/snort.common.parameters
[grml-live.git] / etc / grml / fai / config / hooks / instsoft.GRMLBASE
1 #!/bin/sh
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: Mon Oct 15 19:29:19 CEST 2007 [mika]
8 ################################################################################
9
10 set -u
11 set -e
12
13 # work around http://trac.lighttpd.net/trac/ticket/657
14 # should be removed later on:
15 echo "Acquire::http::Pipeline-Depth "0"; // added by grml-live" >> $target/etc/apt/apt.conf
16
17 # install grml keys:
18 gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787
19 gpg --export F61E2E7CECDEA787 > $target/etc/apt/grml.key
20 $ROOTCMD apt-key add /etc/apt/grml.key
21
22 # make sure we have file-rc available before
23 # package_config/GRML is being executed:
24 $ROOTCMD apt-get update
25 $ROOTCMD aptitude -f -y install file-rc
26
27 # Workaround #443481 of snort for Debian/etch:
28 mkdir -p $target/etc/snort
29 echo 'LOGDIR=/var/log/snort' >> $target/etc/snort/snort.common.parameters
30
31 # we definitely don't want to fail running fai dirinstall just
32 # because of some well known bugs:
33 [ -d $target/etc/apt/apt.conf.d ] || mkdir $target/etc/apt/apt.conf.d
34 cat > $target/etc/apt/apt.conf.d/10apt-listbugs << EOF
35 // Check all packages whether they has critical bugs before they are installed.
36 // If you don't like it, comment it out.
37 //DPkg::Pre-Install-Pkgs {"/usr/sbin/apt-listbugs apt || exit 10"};
38 //DPkg::Tools::Options::/usr/sbin/apt-listbugs "";
39 //DPkg::Tools::Options::/usr/sbin/apt-listbugs::Version "2";
40 EOF
41
42 # make sure /dev/MAKEDEV is available:
43 if [ -x "$target"/sbin/MAKEDEV ] && ! [ -r "$target"/dev/MAKEDEV ] ; then
44    ln -s /sbin/MAKEDEV "$target"/dev/MAKEDEV
45 fi
46
47 # we don't need the invoke-rc.d.d diversion (we have grml-policyrcd :)):
48 if [ -L "$target"/usr/sbin/invoke-rc.d ] ; then
49    rm -f "$target"/usr/sbin/invoke-rc.d
50    $ROOTCMD dpkg-divert --package fai --rename --remove /usr/sbin/invoke-rc.d
51 fi
52
53 ## END OF FILE #################################################################
54 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3