Wait for the apt.daily service to finish instead of killing it avoiding bad state (#45)

This commit is contained in:
Jorge Marin
2018-03-14 10:34:51 +01:00
committed by GitHub
parent 74b802b9b2
commit cc2266fd02
+1 -3
View File
@@ -8,9 +8,7 @@ before_install:
# Fix for Ubuntu Xenial apt-daily.service triggering
# https://unix.stackexchange.com/questions/315502/how-to-disable-apt-daily-service-on-ubuntu-cloud-vm-image
- |
sudo systemctl stop apt-daily.service &&
sudo systemctl kill --kill-who=all apt-daily.service &&
while ! (systemctl list-units --all apt-daily.service | fgrep -q dead) ; do
while sudo fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock >/dev/null 2>&1; do
sleep 1
done
- sudo apt-get -qq update