X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fhooks%2Finstsoft.GRMLBASE;h=c9932d83506c2076f83fec489cfef9c73a9f4536;hp=0d6cae5d9c3233e4dd9b46b79b147a1d17987a89;hb=ef74e870ca6a2b6f307d6390d7fb9f6964299551;hpb=465346b41da7ba02a7609de03a7e49d325295c1c diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index 0d6cae5..c9932d8 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -6,6 +6,11 @@ # 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 @@ -55,13 +60,18 @@ EOF $ROOTCMD ln -s /bin/true /usr/sbin/grub-probe fi - # Update package lists (so they exist at all), so we actually can - # install software. - $ROOTCMD apt-get update + # Update package lists (so they exist at all), so we can install + # software; if /var/lib/dpkg/available is empty, it was was probably + # cleaned by GRMLBASE/98-clean-chroot, so we need to rebuild it + # anyway + $ROOTCMD /usr/lib/dpkg/methods/apt/update /var/lib/dpkg/ apt apt - # 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 + 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 @@ -118,9 +128,12 @@ if ! $ROOTCMD apt-get update ; then echo "Warning: there was an error executing apt-get update, continuing anyway." >&2 fi -# 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 +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