X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fhooks%2Fupdatebase.GRMLBASE;h=108b1ec8c85b83f70f132de7c191bc138f4d412a;hb=d338d0cc0f1a78f85e40e2fdf91476b780fa13ff;hp=b04e0ba4b7eb4ea46ca751117cc38d8f76ac0d85;hpb=343ab03f983902acf628aebff804da2f6085a272;p=grml-live.git diff --git a/etc/grml/fai/config/hooks/updatebase.GRMLBASE b/etc/grml/fai/config/hooks/updatebase.GRMLBASE index b04e0ba..108b1ec 100755 --- a/etc/grml/fai/config/hooks/updatebase.GRMLBASE +++ b/etc/grml/fai/config/hooks/updatebase.GRMLBASE @@ -1,55 +1,71 @@ -#!/bin/sh -# Filename: /etc/grml/fai/config/hooks/updatebase.GRMLBASE -# Purpose: skip task updatebase of FAI when running softupdate +#!/bin/bash +# 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/apt/grml.key - $ROOTCMD apt-key add /etc/apt/grml.key +if [ -n "$BOOTSTRAP_ONLY" ] ; then + echo "Skipping task configure in hooks/updatebase.GRMLBASE as BOOTSTRAP_ONLY environment is set." + skiptask configure fi +# work around #632624: udev fails to install on systems with old kernel versions +if ! [ -e ${target}/etc/udev/kernel-upgrade ] ; then + echo "Working around udev package bug, creating /etc/udev/kernel-upgrade" + echo "# installed via updatebase.GRMLBASE" > ${target}/etc/udev/kernel-upgrade fi +# install all apt related files +fcopy -B -v -r /etc/apt + +# 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