X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fhooks%2Finstsoft.GRMLBASE;h=d0a09f72ba00a527e3fe3bd2dc07c6079f7989de;hp=de5055ced52bef7a9f7e0b641249016ca8284dcf;hb=e97a5d7afe24d326bae906fe1637e2f0cfd09065;hpb=400c54b8ee5a762b6f6a4dadcefb98df6c1fd7b0 diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index de5055c..d0a09f7 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -33,11 +33,6 @@ if [ "$FAI_ACTION" = "softupdate" ] ; then sed -i "s/EXITSTATUS=.*/EXITSTATUS='101'/" $target/etc/policy-rc.d.conf fi - # 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 - # we definitely don't want to fail running fai sofupdate just # because of some well known bugs: [ -d $target/etc/apt/apt.conf.d ] || mkdir $target/etc/apt/apt.conf.d @@ -84,20 +79,17 @@ EOF 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 - -# Recommends just pull in way tooooo much packages, so disable it: -echo "APT::Install-Recommends "false"; // added by grml-live" >> $target/etc/apt/apt.conf -# Notice: deprecated since aptitude (0.4.11-1): -echo "Aptitude::Recommends-Important "false"; // added by grml-live" >> $target/etc/apt/apt.conf +# install all apt related files +if [ -r /etc/grml/fai/files/etc/apt ] ; then + cp -a /etc/grml/fai/files/etc/apt/* $target/etc/apt/ +fi # install all present (but at least the grml) gpg keys: if [ -r /etc/grml/fai/files/etc/apt/grml.key ] ; then for file in /etc/grml/fai/files/etc/apt/*.key ; do FILE="$(basename $file)" - cp $file $target/etc/apt/"$FILE" + # installed via 'cp -a /etc/grml/fai/files/etc/apt/* $target/etc/apt/' above already + # cp $file $target/etc/apt/"$FILE" $ROOTCMD apt-key add /etc/apt/"$FILE" done else @@ -107,9 +99,19 @@ else $ROOTCMD apt-key add /etc/apt/grml.key fi -# 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 +# work around http://trac.lighttpd.net/trac/ticket/657 +if ! grep -q 'Acquire::http::Pipeline-Depth.*0' $target/etc/apt/apt.conf ; then + echo "Acquire::http::Pipeline-Depth 0; // added by grml-live" >> $target/etc/apt/apt.conf +fi + +# Recommends just pull in way tooooo much packages, so disable it: +if ! grep -q 'APT::Install-Recommends.*false' $target/etc/apt/apt.conf ; then + echo "APT::Install-Recommends false; // added by grml-live" >> $target/etc/apt/apt.conf +fi + +# Notice: deprecated with aptitude (0.4.11-1): +if ! grep -q 'Aptitude::Recommends-Important.*false' $target/etc/apt/apt.conf ; then + echo "Aptitude::Recommends-Important false; // added by grml-live" >> $target/etc/apt/apt.conf fi # make sure we have file-rc available before