25 lines
591 B
Bash
Executable File
25 lines
591 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
REAL_USER=$(who am i | awk '{print $1}')
|
|
APPLIANCE_NAME="Rocky-9-aarch64-minimal"
|
|
KICKSTARTER_FILENAME="${APPLIANCE_NAME}.ks"
|
|
|
|
if [[ ${EUID} -ne 0 ]]; then
|
|
>&2 echo "ERROR: Please run this script as root"
|
|
exit 1
|
|
fi
|
|
|
|
appliance-creator \
|
|
--config "${KICKSTARTER_FILENAME}" \
|
|
--name "${APPLIANCE_NAME}" \
|
|
--format raw \
|
|
--checksum \
|
|
--no-compress \
|
|
--outdir "${PWD}" \
|
|
--debug \
|
|
--verbose \
|
|
1> Rocky-9-aarch64-minimal.stdout.log \
|
|
2> Rocky-9-aarch64-minimal.stderr.log
|
|
|
|
chown "${REAL_USER}:${REAL_USER}" "${APPLIANCE_NAME}*"
|