instsoft.GRMLBASE: Use --force-yes option when using apt-get for upgrade.
authorMichael Prokop <mika@grml.org>
Sun, 10 Jul 2011 13:54:59 +0000 (15:54 +0200)
committerMichael Prokop <mika@grml.org>
Sun, 10 Jul 2011 13:55:02 +0000 (15:55 +0200)
For example when configuration files have been modified and user
input is required then apt-get will fail and complain with:

| E: There are problems and -y was used without --force-yes

So let's force the action as we are in automated mode.

etc/grml/fai/config/hooks/instsoft.GRMLBASE

index e5e6800..cf73040 100755 (executable)
@@ -92,7 +92,7 @@ EOF
          APT_LISTCHANGES_FRONTEND=none APT_LISTBUGS_FRONTEND=none $ROOTCMD aptitude -y upgrade
       fi
    else
-      APT_LISTCHANGES_FRONTEND=none APT_LISTBUGS_FRONTEND=none $ROOTCMD apt-get -y upgrade
+      APT_LISTCHANGES_FRONTEND=none APT_LISTBUGS_FRONTEND=none $ROOTCMD apt-get -y --force-yes upgrade
    fi
 
    exit # make sure we don't continue behind the following "fi"