summaryrefslogtreecommitdiffstats
path: root/packer/provision
diff options
context:
space:
mode:
authorAndrew Grimberg <agrimberg@linuxfoundation.org>2016-12-21 06:36:30 -0800
committerAndrew Grimberg <agrimberg@linuxfoundation.org>2016-12-21 06:38:14 -0800
commit6079577f7cd9a64d761a80581c8abe40e79fcd6a (patch)
treeaf5425aa96d5048f22ffd05dd8ab2e40569fb927 /packer/provision
parentb2d3edd937c2e910f727358a9fdcf250ff321642 (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>
Diffstat (limited to 'packer/provision')
-rw-r--r--packer/provision/basebuild/.dummy0
-rw-r--r--packer/provision/baseline.sh12
2 files changed, 12 insertions, 0 deletions
diff --git a/packer/provision/basebuild/.dummy b/packer/provision/basebuild/.dummy
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/packer/provision/basebuild/.dummy
diff --git a/packer/provision/baseline.sh b/packer/provision/baseline.sh
index 36783554..e33821cb 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() {