Skip to content

Commit 18bd8e3

Browse files
committed
[Internal] Packer: apt-upgrade.sh: autoaccept conffiles changes
Fixes such errors: Configuration file '/etc/systemd/resolved.conf.d/gce-resolved.conf' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. 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. *** gce-resolved.conf (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package google-compute-engine (--configure): end of file on stdin at conffile prompt
1 parent 47b1eda commit 18bd8e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/packer/provisioners/kernel/apt-upgrade.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,9 @@ apt_update_with_retry() {
4040
}
4141

4242
apt_update_with_retry
43-
sudo DEBIAN_FRONTEND=noninteractive apt-get -o DPkg::Lock::Timeout=60 dist-upgrade -y -q
43+
# See https://man7.org/linux/man-pages/man1/dpkg.1.html#OPTIONS for confold/confdef
44+
sudo DEBIAN_FRONTEND=noninteractive apt-get \
45+
-o DPkg::Lock::Timeout=60 \
46+
-o Dpkg::Options::=--force-confold \
47+
-o Dpkg::Options::=--force-confdef \
48+
dist-upgrade -y -q

0 commit comments

Comments
 (0)