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