X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fhooks%2Fupdatebase.GRMLBASE;h=108b1ec8c85b83f70f132de7c191bc138f4d412a;hb=7d3ca651729de1f6e236e98653b6a1312017e072;hp=2b9d180dc6b1dc064d634150202cff88e6a43e00;hpb=4b2e8632eba4fa2343986f897cfcd59ed1413d66;p=grml-live.git diff --git a/etc/grml/fai/config/hooks/updatebase.GRMLBASE b/etc/grml/fai/config/hooks/updatebase.GRMLBASE index 2b9d180..108b1ec 100755 --- a/etc/grml/fai/config/hooks/updatebase.GRMLBASE +++ b/etc/grml/fai/config/hooks/updatebase.GRMLBASE @@ -1,45 +1,71 @@ #!/bin/bash -# Filename: /etc/grml/fai/config/hooks/updatebase.GRMLBASE -# Purpose: skip task updatebase of FAI when running softupdate +# Filename: ${GRML_FAI_CONFIG}/hooks/updatebase.GRMLBASE +# Purpose: Updates the base packages of the system, prepare chroot for instsoft # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. ################################################################################ -if [ "$FAI_ACTION" = "softupdate" ] ; then +set -u +set -e + +# visualize chroot inside zsh: +echo grml_chroot > $target/etc/debian_chroot - ## we want to use our own sources.list: - skiptask updatebase +HOSTNAME='' +[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf +[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local +[ -n "$HOSTNAME" ] || HOSTNAME=grml +echo "$HOSTNAME" > $target/etc/hostname - ## make sure we don't start any daemons - removed - ## later on via /etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot - if ! [ -r $target/usr/sbin/policy-rc.d ] ; then - cat > $target/usr/sbin/policy-rc.d << EOF -#!/bin/sh -# FAI_ACTION=updatebase -exit 101 +if [ -n "${APT_PROXY:-}" ] ; then + cat > $target/etc/apt/apt.conf.d/90grml-apt-proxy.conf < ${target}/etc/udev/kernel-upgrade fi -# install grml gpg key: -fcopy /etc/apt/grml.key -$ROOTCMD apt-key add /etc/apt/grml.key +# install all apt related files +fcopy -B -v -r /etc/apt -fi # softupdate check +# install Grml gpg key: +$ROOTCMD apt-key add /etc/apt/grml.key ## END OF FILE ################################################################# -# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2