-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable automatic updates on Ubuntu and install qemu guest agent
- Loading branch information
1 parent
dfbabb8
commit 4603563
Showing
4 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh -eux | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
echo "==> Disable release-upgrades" | ||
sed -i.bak 's/^Prompt=.*$/Prompt=never/' /etc/update-manager/release-upgrades; | ||
|
||
echo "==> Disable systemd apt timers/services" | ||
systemctl stop apt-daily.timer; | ||
systemctl stop apt-daily-upgrade.timer; | ||
systemctl disable apt-daily.timer; | ||
systemctl disable apt-daily-upgrade.timer; | ||
systemctl mask apt-daily.service; | ||
systemctl mask apt-daily-upgrade.service; | ||
systemctl daemon-reload; | ||
|
||
# Disable periodic activities of apt to be safe | ||
cat <<EOF >/etc/apt/apt.conf.d/10periodic; | ||
APT::Periodic::Enable "0"; | ||
APT::Periodic::Update-Package-Lists "0"; | ||
APT::Periodic::Download-Upgradeable-Packages "0"; | ||
APT::Periodic::AutocleanInterval "0"; | ||
APT::Periodic::Unattended-Upgrade "0"; | ||
EOF | ||
|
||
echo "==> Remove the unattended-upgrades and ubuntu-release-upgrader-core packages" | ||
apt-get -y purge unattended-upgrades ubuntu-release-upgrader-core; | ||
rm -rf /var/log/unattended-upgrades; | ||
|
||
apt-get update; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh -eux | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
echo "==> Install qemu guest agent" | ||
apt-get install -y qemu-guest-agent | ||
apt-get -y autoremove |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters