2019-05-14 23:24:16 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
if [ ! -e /usr/share/lorax/templates.d/80-rhel/ ]; then
|
|
|
|
echo "Failed to find lorax-templates-rhel templates in /usr/share/lorax/templates.d/"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Gather up the list of system repo files and use them for lorax
|
2024-06-04 18:01:57 +00:00
|
|
|
# Skip fedora.repo
|
|
|
|
REPOS=$(find /etc/yum.repos.d/ -maxdepth 1 -type f -name '*\.repo' ! -name 'fedora.repo' -exec echo -n "--repo {} " \;)
|
2019-05-14 23:24:16 +00:00
|
|
|
if [ -z "$REPOS" ]; then
|
|
|
|
echo "No system repos found"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-06-25 20:38:27 +00:00
|
|
|
# The c10s tmt systems have started using $stream in the repo urls as of 6/2024, substitute
|
|
|
|
# 10-stream for this variable so that they can be passed to lorax
|
|
|
|
sed -i 's/$stream/10-stream/g' /etc/yum.repos.d/*.repo
|
|
|
|
|
2019-05-14 23:24:16 +00:00
|
|
|
# Run lorax using the host's repository configuration file
|
2024-05-22 18:05:22 +00:00
|
|
|
lorax --product="Red Hat Enterprise Linux" --version=10 --release=10 --volid="RHEL-10-test" \
|
|
|
|
$REPOS --isfinal --nomacboot /var/tmp/lorax-rhel10-iso/
|