X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fhooks%2Finstsoft.GRMLBASE;h=b192b8a2f5c55535626424820c9a452a9d69b06b;hb=9b4f4a4961b8935e3a3906f05fb17aca0ad2b847;hp=213f39c9afdde29b694d7fe76375c63a886b6201;hpb=339590e244585c5334c41250b10abdc01e732a17;p=grml-live.git diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index 213f39c..b192b8a 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -58,6 +58,9 @@ EOF rm $target/etc/apt/sources.list fi cp /etc/grml/fai/apt/sources.list $target/etc/apt/sources.list.d/grml-live.list + if [ -r $target/etc/apt/sources.list.d/grml.list ] ; then + mv $target/etc/apt/sources.list.d/grml.list $target/etc/apt/sources.list.d/grml.unused + fi fi # run it on our own, as updatebase is used at the wrong stage for our needs, @@ -83,7 +86,9 @@ else # no softupdate but fresh installation 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 + if [ -r $target/etc/apt/important_note.txt ] ; then + grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt + fi fi # install all present (but at least the grml) gpg keys: @@ -122,7 +127,14 @@ fi # make sure we have file-rc available before # package_config/GRML is being executed: $ROOTCMD apt-get update -$ROOTCMD aptitude -f -y install file-rc +# newer aptitude versions won't remove essential packages using +# 'aptitude -f -y install file-rc' anymore, therefore force it: +$ROOTCMD aptitude -o Aptitude::ProblemResolver::Keep-All-Tier=60000 -f -y install file-rc + +# get rid of insserv: +if $ROOTCMD dpkg --list insserv 2>/dev/null | grep -q '^ii' ; then + $ROOTCMD apt-get -y --purge remove insserv +fi # we definitely don't want to fail running fai dirinstall just # because of some well known bugs: