diff options
author | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2017-01-19 21:30:13 -0800 |
---|---|---|
committer | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2017-01-19 21:30:13 -0800 |
commit | 560e4f7238ff8d7a61acf718897528b8e9b7b743 (patch) | |
tree | 1279c9ac522aef3addc77005903c095ff9ed7a4d /packer/provision | |
parent | 247134c09e5c42d5ad63d2e57e0561ec4ea14c46 (diff) |
Disable automatic system updates on Ubuntu
The cloud-init package has a hard dependency on the automatic update
mechanism in Ubuntu 14.04. As removing this causes systems to not be
accessible when booted, instead we're just going disable all of the
options for the automatic update system
Change-Id: I209dabe5deeda0fa30cfea918fc4feb4948cc0df
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Diffstat (limited to 'packer/provision')
-rw-r--r-- | packer/provision/baseline.sh | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/packer/provision/baseline.sh b/packer/provision/baseline.sh index e33821cb..f6ed415d 100644 --- a/packer/provision/baseline.sh +++ b/packer/provision/baseline.sh @@ -123,15 +123,8 @@ EOF # 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 + sed -ine 's/"1"/"0"/g' /etc/apt/apt.conf.d/10periodic + echo 'APT::Periodic::Unattended-Upgrade "0";' >> /etc/apt/apt.conf.d/10periodic } all_systems() { |