2021-09-02 13:56:59 +00:00
|
|
|
#!/bin/sh -eux
|
|
|
|
|
|
|
|
|
|
|
|
# Prepare test work directory
|
|
|
|
|
|
|
|
WORK_DIR=$(mktemp -d /var/tmp/dirinstall.XXXXXX)
|
|
|
|
|
|
|
|
|
|
|
|
# Create kickstart
|
|
|
|
|
|
|
|
KICKSTART_PATH=${WORK_DIR}/ks.cfg
|
|
|
|
source ./repositories
|
|
|
|
TEST_KICKSTART=./ks.dirinstall.cfg
|
|
|
|
|
|
|
|
# Dump URLs of installation repositories found in local repositories whose names are configured in 'repositories' file
|
2021-10-05 12:02:11 +00:00
|
|
|
echo "url --url=$(dnf repoinfo $BASE_REPO | grep ^Repo-baseurl | cut -d: -f2- | sed 's/^ *//')" > ${KICKSTART_PATH}
|
2021-09-02 13:56:59 +00:00
|
|
|
for repo in $REPOS; do
|
2021-10-05 12:02:11 +00:00
|
|
|
echo "repo --name=$repo --baseurl=$(dnf repoinfo $repo | grep ^Repo-baseurl | cut -d: -f2- | sed 's/^ *//')" >> ${KICKSTART_PATH}
|
2021-09-02 13:56:59 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
cat ${TEST_KICKSTART} >> ${KICKSTART_PATH}
|
|
|
|
|
|
|
|
# Log the kickstart
|
|
|
|
cat ${KICKSTART_PATH}
|
|
|
|
|
|
|
|
|
|
|
|
# Run dirinstall
|
|
|
|
|
|
|
|
INSTALL_DIR=${WORK_DIR}/install_dir
|
|
|
|
mkdir ${INSTALL_DIR}
|
|
|
|
|
|
|
|
anaconda --dirinstall ${INSTALL_DIR} --kickstart ${KICKSTART_PATH} --${ANACONDA_UI_MODE} --noninteractive 2>&1
|
|
|
|
|
|
|
|
|
|
|
|
# Remove test work directory
|
|
|
|
|
|
|
|
rm -rf ${WORK_DIR}
|
|
|
|
|
|
|
|
|
|
|
|
# Show and remove the logs for this anaconda run
|
|
|
|
|
|
|
|
./show_logs.sh
|