From: Michael Prokop Date: Mon, 26 May 2014 08:49:00 +0000 (+0200) Subject: Do not fail in upgrade mode (-u) when configuration files have been modified X-Git-Tag: v0.24.0~2 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=412c0bebc0bcf351ed58f5656a2145d02b0bb58e;ds=sidebyside Do not fail in upgrade mode (-u) when configuration files have been modified Custom configuration files might be present and upgrading packages might fail then: | Setting up sudo (1.8.9p5-1) ... | | Configuration file '/etc/sudoers' | ==> File on system created by you or by a script. | ==> File also in package provided by package maintainer. | What would you like to do about it ? Your options are: | Y or I : install the package maintainer's version | N or O : keep your currently-installed version | D : show the differences between the versions | Z : start a shell to examine the situation | The default action is to keep your current version. | *** sudoers (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package sudo (--configure): --- diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index cb0bbc1..78a9f57 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -74,6 +74,10 @@ EOF APTITUDE_OPTS="${APTITUDE_OPTS:-} --allow-untrusted" fi + # make sure we don't fail when configuration files changed + APTGET_OPTS="${APTGET_OPTS:-} -o DPkg::Options::=--force-confdef -o DPkg::Options::=--force-confmiss -o DPkg::Options::=--force-confnew" + APTITUDE_OPTS="${APTITUDE_OPTS:-} -o DPkg::Options::=--force-confdef -o DPkg::Options::=--force-confmiss -o DPkg::Options::=--force-confnew" + 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 $APTITUDE_OPTS safe-upgrade