505abd116959ccb35f1ebd063a7dc0615bc66a5a
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 99-finish-grml-build
1 #!/bin/sh
2 # Filename:      /etc/grml/fai/config/scripts/GRMLBASE/99-finish-grml-build
3 # Purpose:       finalize grml chroot build
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: Sun Nov 04 22:28:54 CET 2007 [mika]
8 ################################################################################
9
10 set -u
11 set -e
12
13 # Restore usual Debian behaviour which has been changed
14 # for FAI via /etc/grml/fai/config/hooks/instsoft.GRMLBASE
15 if [ -r $target/etc/apt/apt.conf ] ; then
16    sed -i "s#^Acquire::http::Pipeline-Depth.*#// &#" $target/etc/apt/apt.conf
17    sed -i "s#^APT::Install-Recommends.*#// &#"       $target/etc/apt/apt.conf
18 fi
19
20 # Restore original state from softupdate:
21 if [ -r $target/etc/policy-rc.d.conf ] ; then
22    sed -i "s/EXITSTATUS='101'/EXITSTATUS='0'/" $target/etc/policy-rc.d.conf
23 fi
24
25 # remove an existing /etc/debian_chroot file:
26 if [ -r $target/etc/debian_chroot ] ; then
27    rm -f $target/etc/debian_chroot
28 fi
29
30 # /etc/grml_cd makes the live system recognizable as a live system
31 touch $target/etc/grml_cd
32
33 ## END OF FILE #################################################################
34 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3