@@ -98,19 +98,22 @@ usermod root -p '!!'
9898
9999# Set these to the point release baseurls so we can recreate a previous point release without current major version updates
100100# Set OL repos
101- curl -so /etc/yum.repos.d/CentOS-Base.repo https://raw.githubusercontent.com/szarkos /AzureBuildCentOS/master/config/azure/CentOS-Base-7.repo
102- curl -so /etc/yum.repos.d/OpenLogic.repo https://raw.githubusercontent.com/szarkos /AzureBuildCentOS/master/config/azure/OpenLogic.repo
101+ curl -so /etc/yum.repos.d/CentOS-Base.repo https://raw.githubusercontent.com/openlogic /AzureBuildCentOS/master/config/azure/CentOS-Base-7.repo
102+ curl -so /etc/yum.repos.d/OpenLogic.repo https://raw.githubusercontent.com/openlogic /AzureBuildCentOS/master/config/azure/OpenLogic.repo
103103sed -i -e ' s/$releasever/7.7.1908/' /etc/yum.repos.d/CentOS-Base.repo
104- sed -i -e ' s/$releasever/7.7.1908/' /etc/yum.repos.d/OpenLogic.repo
104+ # sed -i -e 's/$releasever/7.7.1908/' /etc/yum.repos.d/OpenLogic.repo
105105
106106# Import CentOS and OpenLogic public keys
107- curl -so /etc/pki/rpm-gpg/OpenLogic-GPG-KEY https://raw.githubusercontent.com/szarkos /AzureBuildCentOS/master/config/OpenLogic-GPG-KEY
107+ curl -so /etc/pki/rpm-gpg/OpenLogic-GPG-KEY https://raw.githubusercontent.com/openlogic /AzureBuildCentOS/master/config/OpenLogic-GPG-KEY
108108rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
109109rpm --import /etc/pki/rpm-gpg/OpenLogic-GPG-KEY
110110
111111# Set the kernel cmdline
112112sed -i ' s/^\(GRUB_CMDLINE_LINUX\)=".*"$/\1="console=tty1 console=ttyS0,115200n8 earlyprintk=ttyS0,115200 rootdelay=300 net.ifnames=0 scsi_mod.use_blk_mq=y"/g' /etc/default/grub
113113
114+ # Enforce GRUB_TIMEOUT=1 and remove any existing GRUB_TIMEOUT_STYLE and append GRUB_TIMEOUT_STYLE=countdown after GRUB_TIMEOUT
115+ sed -i -n -e ' s/GRUB_TIMEOUT=.*/GRUB_TIMEOUT=1/' -e ' /^GRUB_TIMEOUT_STYLE=/!p' -e ' /^GRUB_TIMEOUT=/aGRUB_TIMEOUT_STYLE=countdown' /etc/default/grub
116+
114117# Enable grub serial console
115118echo ' GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >> /etc/default/grub
116119sed -i ' s/^GRUB_TERMINAL_OUTPUT=".*"$/GRUB_TERMINAL="serial console"/g' /etc/default/grub
@@ -229,11 +232,6 @@ systemctl disable abrtd
229232echo " http_caching=packages" >> /etc/yum.conf
230233yum clean all
231234
232- # Download these again after the HPC build stage so we can recreate a previous point release without current major version updates
233- # Set OL repos
234- curl -so /etc/yum.repos.d/CentOS-Base.repo https://raw.githubusercontent.com/szarkos/AzureBuildCentOS/master/config/azure/CentOS-Base-7.repo
235- curl -so /etc/yum.repos.d/OpenLogic.repo https://raw.githubusercontent.com/szarkos/AzureBuildCentOS/master/config/azure/OpenLogic.repo
236-
237235# Set tuned profile
238236echo " virtual-guest" > /etc/tuned/active_profile
239237
@@ -266,6 +264,11 @@ if [[ -f /mnt/resource/swapfile ]]; then
266264 rm /mnt/resource/swapfile -f
267265fi
268266
267+ # Download these again at the end of the post-install script so we can recreate a previous point release without current major version updates
268+ # Set OL repos
269+ curl -so /etc/yum.repos.d/CentOS-Base.repo https://raw.githubusercontent.com/openlogic/AzureBuildCentOS/master/config/azure/CentOS-Base-7.repo
270+ # curl -so /etc/yum.repos.d/OpenLogic.repo https://raw.githubusercontent.com/openlogic/AzureBuildCentOS/master/config/azure/OpenLogic.repo
271+
269272# Deprovision and prepare for Azure
270273/usr/sbin/waagent -force -deprovision
271274rm -f /etc/resolv.conf 2>/dev/null # workaround old agent bug
0 commit comments