From: Michael Prokop Date: Sun, 10 Jul 2011 16:41:03 +0000 (+0200) Subject: instsoft.GRMLBASE: make sure we can upgrade automatically even with unsigned repos... X-Git-Tag: v0.15.1~22 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=fc9bf3c0d486a9dfb9bcf5d003b70df2803c48d8 instsoft.GRMLBASE: make sure we can upgrade automatically even with unsigned repos if FAI_ALLOW_UNSIGNED is set --- diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index cf73040..9d37e12 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -85,14 +85,21 @@ EOF $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 if $ROOTCMD aptitude --help | grep -q safe-upgrade ; then - APT_LISTCHANGES_FRONTEND=none APT_LISTBUGS_FRONTEND=none $ROOTCMD aptitude -y safe-upgrade + APT_LISTCHANGES_FRONTEND=none APT_LISTBUGS_FRONTEND=none $ROOTCMD aptitude -y $APTITUDE_OPTS safe-upgrade else - APT_LISTCHANGES_FRONTEND=none APT_LISTBUGS_FRONTEND=none $ROOTCMD aptitude -y upgrade + APT_LISTCHANGES_FRONTEND=none APT_LISTBUGS_FRONTEND=none $ROOTCMD aptitude -y $APTITUDE_OPTS upgrade fi else - APT_LISTCHANGES_FRONTEND=none APT_LISTBUGS_FRONTEND=none $ROOTCMD apt-get -y --force-yes upgrade + APT_LISTCHANGES_FRONTEND=none APT_LISTBUGS_FRONTEND=none $ROOTCMD apt-get -y $APTGET_OPTS --force-yes upgrade fi exit # make sure we don't continue behind the following "fi"