- # run it on our own, as updatebase is used at the wrong stage for our needs,
- # see /etc/grml/fai/config/hooks/updatebase.GRMLBASE
- $ROOTCMD apt-get update
- if [ -x $target/usr/bin/aptitude ] ; then
+ # 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 ! $ROOTCMD test -x /usr/bin/aptitude ; then
+ $ROOTCMD apt-get -y install aptitude
+ fi
+
+ # make sure we can upgrade automatically,
+ # even with unsigned repos, but only if user wants it
+ if [ "${FAI_ALLOW_UNSIGNED:-}" = "1" ] ; then
+ APTGET_OPTS="${APTGET_OPTS:-} --allow-unauthenticated"
+ APTITUDE_OPTS="${APTITUDE_OPTS:-} --allow-untrusted"
+ fi
+
+ if $ROOTCMD test -x /usr/bin/aptitude ; then