Files
koji-setup-scripts/koji-setup/globals.sh
George T Kramer 843439f0eb Conditionally run swupd during setup
swupd should only be run during setup when on an officially released
version of Clear that has an upadate stream.  Development versions are
usually indicated when the VERSION_ID is equal to 1 and do not have an
update stream.  In these cases, the assumption is that all required
software is already installed prior to setup.

However, add checks for only the most critical dependencies before
continuing with the setup so that it more obvious to the user that these
are missing when they are.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
2019-10-03 14:43:43 -07:00

29 lines
556 B
Bash

#!/bin/bash
# Copyright (C) 2019 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#### START DO NOT EDIT ####
export GIT_USER=gitolite
export GIT_DEFAULT_DIR=/var/lib/gitolite
export POSTGRES_USER=postgres
export POSTGRES_DEFAULT_DIR=/var/lib/pgsql
export HTTPD_USER=httpd
export HTTPD_DOCUMENT_ROOT=/var/www/html
export KOJI_PKI_DIR=/etc/pki/koji
check_dependency() {
if [[ "$#" -ne 1 ]]; then
echo "Incorrect number of arguments!" >&2
exit 1
fi
if ! type "$1"; then
echo "$1 not found!" >&2
exit 1
fi
}
#### END DO NOT EDIT ####