2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-08-05 10:17:49 +00:00
Files
xcat-core/xCAT-server/share/xcat/install/scripts/post.rhels10
T
Vinícius Ferrão 1f9173f07a Fix some EL9 and EL10 provisioning gaps (#7530)
* Fix EL9 and EL10 provisioning gaps
2026-05-02 04:27:54 +02:00

29 lines
1.2 KiB
Bash

#!/bin/bash
# The nic name might change between the installation and 1st boot
# Active all the nics with network link during system boot
[ "$XCATDEBUGMODE" ] || export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#"
[ "$MASTER_IP" ] || export MASTER_IP="#ENV:MASTER_IP#"
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib#
if command -v nmcli >/dev/null 2>&1; then
nmcli -g NAME,STATE con show | \
awk -F: '$1 != "lo" && $2 == "activated" {print $1}' | \
while IFS= read -r con_name
do
[ -n "$con_name" ] || continue
nmcli con mod "$con_name" connection.autoconnect yes
done
fi
internet_repo_file_list="oracle-linux-ol10.repo uek-ol10.repo Rocky-AppStream.repo Rocky-BaseOS.repo Rocky-Extras.repo rocky.repo rocky-extras.repo CentOS-Base.repo centos.repo centos-addons.repo almalinux-ha.repo almalinux-nfv.repo almalinux-powertools.repo almalinux.repo almalinux-resilientstorage.repo almalinux-rt.repo"
for repo_file in $internet_repo_file_list
do
if [ -f /etc/yum.repos.d/$repo_file ]; then
sed -i -e 's/^[[:space:]]*enabled[[:space:]]*=[[:space:]]*1/enabled=0/' /etc/yum.repos.d/$repo_file
fi
done
exit 0