aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchenxing <chason.chan@foxmail.com>2017-12-21 19:55:19 +0800
committerChason Chan <chason.chan@foxmail.com>2018-01-17 15:42:29 +0000
commita5cac970ce87e1aecf268c61f9c37a5a3862ca93 (patch)
treeca95e602acc0fc21c97dab47cddbfe5491a9fd73
parentd568df9bccccf78d92276ac3be98dc2f0a61fb79 (diff)
downloadkolla-a5cac970ce87e1aecf268c61f9c37a5a3862ca93.tar.gz
kolla-a5cac970ce87e1aecf268c61f9c37a5a3862ca93.zip
Check whether the source file exists before configuring the dashboard
Change-Id: If96f8d8b4f4c87724b73ed866c9ec6007b70371c Closes-Bug: #1699083
-rw-r--r--docker/horizon/extend_start.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/docker/horizon/extend_start.sh b/docker/horizon/extend_start.sh
index 454e1fa49..39302b9a0 100644
--- a/docker/horizon/extend_start.sh
+++ b/docker/horizon/extend_start.sh
@@ -30,7 +30,9 @@ function config_dashboard {
ENABLE=$1
SRC=$2
DEST=$3
- if [[ "${ENABLE}" == "yes" ]] && [[ ! -f "${DEST}" ]]; then
+ if [[ ! -f ${SRC} ]]; then
+ echo "WARNING: ${SRC} is required"
+ elif [[ "${ENABLE}" == "yes" ]] && [[ ! -f "${DEST}" ]]; then
cp -a "${SRC}" "${DEST}"
FORCE_GENERATE="yes"
elif [[ "${ENABLE}" != "yes" ]] && [[ -f "${DEST}" ]]; then