mirror of
https://github.com/bitnami/minideb.git
synced 2026-06-04 10:13:55 +08:00
Wait for the apt.daily service to finish instead of killing it avoiding bad state (#45)
This commit is contained in:
+1
-3
@@ -8,9 +8,7 @@ before_install:
|
|||||||
# Fix for Ubuntu Xenial apt-daily.service triggering
|
# 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
|
# https://unix.stackexchange.com/questions/315502/how-to-disable-apt-daily-service-on-ubuntu-cloud-vm-image
|
||||||
- |
|
- |
|
||||||
sudo systemctl stop apt-daily.service &&
|
while sudo fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock >/dev/null 2>&1; do
|
||||||
sudo systemctl kill --kill-who=all apt-daily.service &&
|
|
||||||
while ! (systemctl list-units --all apt-daily.service | fgrep -q dead) ; do
|
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
- sudo apt-get -qq update
|
- sudo apt-get -qq update
|
||||||
|
|||||||
Reference in New Issue
Block a user