forked from containers/podman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cirrus: disable Evil Units in base-images
Also, minor update to prevent harmless 'Fatal: not a git repo' error. Signed-off-by: Chris Evich <cevich@redhat.com>
- Loading branch information
Showing
6 changed files
with
45 additions
and
43 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
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
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,28 @@ | ||
#!/bin/bash | ||
|
||
set +e # Not all of these exist on every platform | ||
|
||
# This is intended to be executed on VMs as a startup script on initial-boot. | ||
# Alternativly, it may be executed with the '--list' option to return the list | ||
# of systemd units defined for disablement (useful for testing). | ||
|
||
EVIL_UNITS="cron crond atd apt-daily-upgrade apt-daily fstrim motd-news systemd-tmpfiles-clean" | ||
|
||
if [[ "$1" == "--list" ]] | ||
then | ||
echo "$EVIL_UNITS" | ||
exit 0 | ||
fi | ||
|
||
echo "Disabling periodic services that could destabilize testing:" | ||
for unit in $EVIL_UNITS | ||
do | ||
echo "Banishing $unit (ignoring errors)" | ||
( | ||
sudo systemctl stop $unit | ||
sudo systemctl disable $unit | ||
sudo systemctl disable $unit.timer | ||
sudo systemctl mask $unit | ||
sudo systemctl mask $unit.timer | ||
) &> /dev/null | ||
done |