diff options
author | 2016-12-21 06:36:30 -0800 | |
---|---|---|
committer | 2016-12-21 06:38:14 -0800 | |
commit | 6079577f7cd9a64d761a80581c8abe40e79fcd6a (patch) | |
tree | af5425aa96d5048f22ffd05dd8ab2e40569fb927 | |
parent | b2d3edd937c2e910f727358a9fdcf250ff321642 (diff) |
Update Ubuntu baseline to disable daily auto-update
* Updates the Ubuntu baseline build section to forcibly disable the
default daily system package update for security patches
* Make sure that the provision/basebuild directory that the build
template is using exists with a .dummy placeholder
Change-Id: Iffd493c3cfb6263d32d65d06e0e20a3bdbc58926
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
-rw-r--r-- | packer/provision/basebuild/.dummy | 0 | ||||
-rw-r--r-- | packer/provision/baseline.sh | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/packer/provision/basebuild/.dummy b/packer/provision/basebuild/.dummy new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/packer/provision/basebuild/.dummy diff --git a/packer/provision/baseline.sh b/packer/provision/baseline.sh index 36783554d..e33821cb4 100644 --- a/packer/provision/baseline.sh +++ b/packer/provision/baseline.sh @@ -120,6 +120,18 @@ EOF # make sure that we still default to openjdk 7 update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac + + # disable unattended upgrades & daily updates + echo '---> Disabling automatic daily upgrades' + apt-get remove unattended-upgrades + if [ -f /usr/bin/systemctl ] + then + systemctl stop apt.systemd.daily + systemctl disable apt.systemd.daily + else + /etc/init.d/unattended-upgrades stop + update-rc.d -f unattended-upgrades remove + fi } all_systems() { |