X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fhooks%2Finstsoft.GRMLBASE;h=441b009378fbe374e1714bf57ed7d34452eea176;hp=5e543f28da5e2649323e147662a154b409e2407d;hb=3ff2a862f83553916a1148543d69a0bbcc97bf4d;hpb=87c37be5a0cd8450d3e724f673e59c3bd13d5e58 diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index 5e543f2..441b009 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -10,6 +10,24 @@ set -u set -e +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 @@ -22,7 +40,7 @@ $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 + cp /etc/grml/fai/apt/preferences $target/etc/apt/preferences fi # make sure we have file-rc available before @@ -56,5 +74,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