github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/contrib/cirrus/packer/fedora_base-setup.sh (about) 1 #!/bin/bash 2 3 # N/B: This script is not intended to be run by humans. It is used to configure the 4 # fedora base image for importing, so that it will boot in GCE 5 6 set -e 7 8 # Load in library (copied by packer, before this script was run) 9 source $GOSRC/$SCRIPT_BASE/lib.sh 10 11 install_ooe 12 13 echo "Updating packages" 14 ooe.sh dnf -y update 15 16 echo "Installing necessary packages and google services" 17 ooe.sh dnf -y install rng-tools google-compute-engine-tools google-compute-engine-oslogin ethtool 18 19 echo "Enabling services" 20 ooe.sh systemctl enable rngd 21 22 # There is a race that can happen on boot between the GCE services configuring 23 # the VM, and cloud-init trying to do similar activities. Use a customized 24 # unit file to make sure cloud-init starts after the google-compute-* services. 25 echo "Setting cloud-init service to start after google-network-daemon.service" 26 cp -v $GOSRC/$PACKER_BASE/cloud-init/fedora/cloud-init.service /etc/systemd/system/ 27 28 # Ensure there are no disruptive periodic services enabled by default in image 29 systemd_banish 30 31 rh_finalize 32 33 echo "SUCCESS!"