diff --git a/images/linux/scripts/installers/dpkg-config.sh b/images/linux/scripts/installers/dpkg-config.sh new file mode 100644 index 000000000..e92e42700 --- /dev/null +++ b/images/linux/scripts/installers/dpkg-config.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# This is the anti-frontend. It never interacts with you at all, +# and makes the default answers be used for all questions. It +# might mail error messages to root, but that's it; otherwise it +# is completely silent and unobtrusive, a perfect frontend for +# automatic installs. If you are using this front-end, and require +# non-default answers to questions, you will need to preseed the +# debconf database +echo 'DEBIAN_FRONTEND=noninteractive' | tee -a /etc/environment + +# dpkg can be instructed not to ask for confirmation +# when replacing a configuration file (with the --force-confdef --force-confold options) +cat <> /etc/apt/apt.conf.d/10dpkg-options +Dpkg::Options { + "--force-confdef"; + "--force-confold"; +} +EOF \ No newline at end of file diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 73d96e83c..01181fad3 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -161,7 +161,9 @@ "{{template_dir}}/scripts/installers/subversion.sh", "{{template_dir}}/scripts/installers/terraform.sh", "{{template_dir}}/scripts/installers/vcpkg.sh", - "{{template_dir}}/scripts/installers/zeit-now.sh" + "{{template_dir}}/scripts/installers/zeit-now.sh", + "{{template_dir}}/scripts/installers/dpkg-config.sh" + ], "environment_vars": [ "METADATA_FILE={{user `metadata_file`}}", diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index dcf2ae543..4eba39c2a 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -164,7 +164,8 @@ "{{template_dir}}/scripts/installers/subversion.sh", "{{template_dir}}/scripts/installers/terraform.sh", "{{template_dir}}/scripts/installers/vcpkg.sh", - "{{template_dir}}/scripts/installers/zeit-now.sh" + "{{template_dir}}/scripts/installers/zeit-now.sh", + "{{template_dir}}/scripts/installers/dpkg-config.sh" ], "environment_vars": [ "METADATA_FILE={{user `metadata_file`}}",