2 # Filename: /etc/grml/fai/config/hooks/updatebase.GRMLBASE
3 # Purpose: skip task updatebase of FAI when running softupdate
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 ################################################################################
9 if [ "$FAI_ACTION" = "softupdate" ] ; then
11 ## we want to use our own sources.list:
14 ## taken from FAI's lib/updatebase:
15 # some packages must access /proc even in chroot environment
16 mount -t proc proc $FAI_ROOT/proc
17 # some packages must access /sys even in chroot environment
18 mount -t sysfs sysfs $FAI_ROOT/sys
19 # if we are using udev, also mount it into $FAI_ROOT
20 [ -f /etc/init.d/udev ] && mount --bind /dev $FAI_ROOT/dev
21 mount -t devpts devpts $FAI_ROOT/dev/pts
23 ## make sure we don't start any daemons - removed
24 ## later on via /etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot
25 if ! [ -r $target/usr/sbin/policy-rc.d ] ; then
26 cat > $target/usr/sbin/policy-rc.d << EOF
28 # FAI_ACTION=updatebase
31 chmod 755 $target/usr/sbin/policy-rc.d
34 # skip the task if we want to build a new ISO only:
35 [ -n "$BUILD_ONLY" ] && skiptask instsoft || /bin/true
37 else # no softupdate but updating chroot based on /etc/grml/fai/config/basefiles/*
39 # install all apt related files
42 # remove grml-live's notice file from chroot:
43 if [ -r $target/etc/apt/important_note.txt ] ; then
44 grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt
47 # install grml gpg key:
48 fcopy /etc/apt/grml.key
49 $ROOTCMD apt-key add /etc/apt/grml.key
53 ## END OF FILE #################################################################
54 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3