X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fhooks%2Finstsoft.GRMLBASE;h=477e6460f10f3895995960a81740add297143c48;hb=398c7063b3d9796ee7bd1bbb85412e2370476574;hp=de5055ced52bef7a9f7e0b641249016ca8284dcf;hpb=fc2735ee93824a987edb05e51979ece9a58d0c39;p=grml-live.git diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index de5055c..477e646 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,19 @@ 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/ + # remove grml-live's sources.list file from chroot: + grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt +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 +101,22 @@ 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 +# make sure the file exists +[ -e $target/etc/apt/apt.conf ] || touch $target/etc/apt/apt.conf + +# 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 @@ -117,10 +124,6 @@ fi $ROOTCMD apt-get update $ROOTCMD aptitude -f -y install file-rc -# Workaround #443481 of snort for Debian/etch: -mkdir -p $target/etc/snort -echo 'LOGDIR=/var/log/snort' >> $target/etc/snort/snort.common.parameters - # we definitely don't want to fail running fai dirinstall just # because of some well known bugs: [ -d $target/etc/apt/apt.conf.d ] || mkdir $target/etc/apt/apt.conf.d