Rework policy-rc.d handling in updatebase once again
[grml-live.git] / etc / grml / fai / config / hooks / updatebase.GRMLBASE
1 #!/bin/sh
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 ################################################################################
8
9 if [ "$FAI_ACTION" = "softupdate" ] ; then
10
11    ## we want to use our own sources.list:
12    skiptask updatebase
13
14    ## make sure we don't start any daemons - removed
15    ## later on via /etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot
16    if ! [ -r $target/usr/sbin/policy-rc.d ] ; then
17       cat > $target/usr/sbin/policy-rc.d << EOF
18 #!/bin/sh
19 # FAI_ACTION=updatebase
20 exit 101
21 EOF
22       chmod 755 $target/usr/sbin/policy-rc.d
23    fi
24
25    # skip the task if we want to build a new ISO only:
26    [ -n "$BUILD_ONLY" ] && skiptask instsoft || /bin/true
27 fi
28
29 ## END OF FILE #################################################################
30 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3