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
timeout=10 | |
function wait_for_apt_deb { | |
while sudo fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock &>/dev/null 2>&1; do | |
echo "Waiting for apt/dpkg lock to release, sleeping ${timeout}s" | |
sleep "${timeout}" | |
done | |
} | |
wait_for_deb && apt-get install vim |
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
#!/bin/bash | |
cat <<EOF >/etc/apt/apt.conf.d/10disable-periodic | |
APT::Periodic::Enable "0"; | |
EOF | |
# Do some stuff with apt/dpkg at boot |
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
systemctl disable apt-daily.service | |
systemctl mask apt-daily.service | |
systemctl disable apt-daily-upgrade.service | |
systemctl mask apt-daily-upgrade.service |