From fc9bf3c0d486a9dfb9bcf5d003b70df2803c48d8 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 10 Jul 2011 18:41:03 +0200 Subject: [PATCH] instsoft.GRMLBASE: make sure we can upgrade automatically even with unsigned repos if FAI_ALLOW_UNSIGNED is set --- etc/grml/fai/config/hooks/instsoft.GRMLBASE | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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" -- 2.1.4