summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-05-28 00:01:59 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-05-28 00:01:59 +0000
commite2fbba00a96856a9457c6ddcc12d4b66a62eb365 (patch)
tree7f561442ca4631d89297ab4f274c0f4d66d72812
parent4ffdf0493d91898edd86329b731752a31d6dcddd (diff)
parent63e172c81d9c1f84ce01a72727dfbc4bd1f605aa (diff)
Merge "Fixes network/inventory checks for baremetal deployments"
-rwxr-xr-xjjb/apex/apex-deploy.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh
index 4706d45a8..0d34f1a7a 100755
--- a/jjb/apex/apex-deploy.sh
+++ b/jjb/apex/apex-deploy.sh
@@ -146,17 +146,17 @@ else
NETWORK_FILE="/root/network/network_settings.yaml"
INVENTORY_FILE="/root/inventory/pod_settings.yaml"
- if [ ! -e "$INVENTORY_FILE" ]; then
+ if ! sudo test -e "$INVENTORY_FILE"; then
echo "ERROR: Required settings file missing: Inventory settings file ${INVENTORY_FILE}"
+ exit 1
fi
# include inventory file for bare metal deployment
DEPLOY_CMD="${DEPLOY_CMD} -i ${INVENTORY_FILE}"
fi
# Check that network settings file exists
-if [ ! -e "$NETWORK_FILE" ]; then
- echo "ERROR: Required settings file missing for Network Settings"
- echo "Network settings file: ${NETWORK_FILE}"
+if ! sudo test -e "$NETWORK_FILE"; then
+ echo "ERROR: Required settings file missing: Network Settings file ${NETWORK_FILE}"
exit 1
fi