Skip to content

Commit

Permalink
Do not fail in upgrade mode (-u) when configuration files have been m…
Browse files Browse the repository at this point in the history
…odified

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):
  • Loading branch information
mika committed May 26, 2014
1 parent 9f0a996 commit 412c0be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions etc/grml/fai/config/hooks/instsoft.GRMLBASE
Expand Up @@ -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
Expand Down

0 comments on commit 412c0be

Please sign in to comment.