X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fhooks%2Finstsoft.GRMLBASE;h=f47a91d454772712e822a9467c17d0b03c55d044;hp=f3cf9ecf37399bc1553ef344ebc2dd25b7fab106;hb=7ca02816220f36c7db5ca4fe3753990b5c4bc3b2;hpb=bc3fb695369f16a11cbbb6ab57bd7d6898fe6f52 diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index f3cf9ec..f47a91d 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -4,12 +4,33 @@ # 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. -# Latest change: Thu Oct 18 14:18:44 CEST 2007 [mika] +# Latest change: Mon Okt 29 23:35:34 CET 2007 [mika] ################################################################################ set -u set -e +# visualize chroot inside zsh: +echo grml_chroot > $target/etc/debian_chroot + +if [ "$FAI_ACTION" = "softupdate" ] ; then + echo "Softupdate" + # make sure we prefer grml repository: + if [ -r /etc/grml/fai/apt/preferences ] ; then + cp /etc/grml/fai/apt/preferences $target/etc/apt/preferences + fi + + if [ -r /etc/grml/fai/apt/sources.list ] ; then + if [ -L $target/etc/apt/sources.list ] ; then + rm $target/etc/apt/sources.list + fi + cp /etc/grml/fai/apt/sources.list $target/etc/apt/sources.list + fi + + $ROOTCMD apt-get update + +else # no softupdate but fresh installation + # work around http://trac.lighttpd.net/trac/ticket/657 # should be removed later on: echo "Acquire::http::Pipeline-Depth "0"; // added by grml-live" >> $target/etc/apt/apt.conf @@ -20,6 +41,11 @@ gpg --keyserver blackhole.pca.dfn.de --recv-keys F61E2E7CECDEA787 gpg --export F61E2E7CECDEA787 > $target/etc/apt/grml.key $ROOTCMD apt-key add /etc/apt/grml.key +# make sure we prefer grml repository: +if [ -r /etc/grml/fai/files/etc/apt/preferences ] ; then + cp /etc/grml/fai/apt/preferences $target/etc/apt/preferences +fi + # make sure we have file-rc available before # package_config/GRML is being executed: $ROOTCMD apt-get update @@ -51,5 +77,7 @@ if [ -L "$target"/usr/sbin/invoke-rc.d ] ; then $ROOTCMD dpkg-divert --package fai --rename --remove /usr/sbin/invoke-rc.d fi +fi # end of FAI_ACTION = softupdate + ## END OF FILE ################################################################# # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3