Cirrus: Silence systemd-banish noise

It's somewhat hard to predict which units are certinly present
for any given base-image.  Therefore, at image-build time, it's
distracting and unhelpful to see all the errors about units that
don't exist, on every platform.  Simply ignore them and rely on
the `check_image.sh` test to confirm none are enabled.

Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
Chris Evich 2019-07-24 10:48:23 -04:00
parent e3082762fe
commit ceb3d76298
No known key found for this signature in database
GPG Key ID: 03EDC70FD578067F
1 changed files with 8 additions and 5 deletions

View File

@ -358,11 +358,14 @@ systemd_banish(){
set +e # Not all of these exist on every platform
for unit in $EVIL_UNITS
do
ooe.sh sudo systemctl stop $unit
ooe.sh sudo systemctl disable $unit
ooe.sh sudo systemctl disable $unit.timer
ooe.sh sudo systemctl mask $unit
ooe.sh sudo systemctl mask $unit.timer
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
set -e
}