X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fhooks%2Finstsoft.GRMLBASE;fp=etc%2Fgrml%2Ffai%2Fconfig%2Fhooks%2Finstsoft.GRMLBASE;h=2c4a880e55e33f53de980ce0398e9fdabfa90040;hp=c9932d83506c2076f83fec489cfef9c73a9f4536;hb=19a0467c9284ddec4b51692d5ca50b9c96726b07;hpb=5a77db439a8a43d9f07e5f4ec5e4ac500fea8be8 diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index c9932d8..2c4a880 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -6,11 +6,6 @@ # License: This file is licensed under the GPL v2 or any later version. ################################################################################ -FILE_RC=false -if ifclass FILE_RC ; then - FILE_RC=true -fi - set -u set -e @@ -66,15 +61,16 @@ EOF # anyway $ROOTCMD /usr/lib/dpkg/methods/apt/update /var/lib/dpkg/ apt apt - if $FILE_RC ; then - echo "Installing file-rc as FILE_RC class is enabled." - # 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 systemd-sysv- - fi - if ! $ROOTCMD test -x /usr/bin/aptitude ; then - $ROOTCMD apt-get -y install aptitude + # the apt-get update might return an error if there's for example + # a hashsum mismatch on Debian mirror sources, we might want to continue + # but should warn the user + if ! $ROOTCMD apt-get update ; then + echo "Warning: there was an error executing apt-get update, continuing anyway." + echo "Warning: there was an error executing apt-get update, continuing anyway." >&2 + fi + + $ROOTCMD apt-get -y install aptitude fi # make sure we can upgrade automatically, @@ -119,21 +115,6 @@ if ! $ROOTCMD dpkg-divert --list | grep -q '/usr/sbin/grub-probe' ; then $ROOTCMD ln -s /bin/true /usr/sbin/grub-probe fi -# make sure we have file-rc available before package_config/GRML* is being executed {{{ -# the apt-get update might return an error if there's for example -# a hashsum mismatch on Debian mirror sources, we might want to continue -# but should warn the user -if ! $ROOTCMD apt-get update ; then - echo "Warning: there was an error executing apt-get update, continuing anyway." - echo "Warning: there was an error executing apt-get update, continuing anyway." >&2 -fi - -if $FILE_RC ; then - echo "Installing file-rc as FILE_RC class is enabled." - # newer aptitude versions won't remove essential packages using - # 'aptitude -f -y install file-rc' anymore, therefore force it via: - $ROOTCMD aptitude -o Aptitude::ProblemResolver::Keep-All-Tier=60000 -f -y install file-rc systemd-sysv- -fi # }}} # we definitely don't want to fail running fai dirinstall just