summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Ptacek <m.ptacek@partner.samsung.com>2019-07-10 11:39:31 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-10 11:39:31 +0000
commit0573ab24eb85e428cb1f1bb80b9956b1a790dcc6 (patch)
tree83a63f97e374165572bb48754ef3f72122914589
parent56416d09c3d5b73e47d6c769078698d13ad14690 (diff)
parent20d3b8afc58ba7dc04f598a6bec04b97036004a4 (diff)
Merge "Fix docker user settings backup"
-rwxr-xr-xbuild/build_nexus_blob.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/build/build_nexus_blob.sh b/build/build_nexus_blob.sh
index 1e21a23a..6ecab695 100755
--- a/build/build_nexus_blob.sh
+++ b/build/build_nexus_blob.sh
@@ -191,7 +191,7 @@ NEXUS_CONFIG=$(echo "${NEXUS_CONFIG_GROOVY}" | jq -Rsc '{"name":"configure", "t
# Add simulated domain names to /etc/hosts
HOSTS_BACKUP="$(eval ${TIMESTAMP}_hosts.bk)"
-cp /etc/hosts "/etc/${HOSTS_BACKUP}"
+cp /etc/hosts /etc/${HOSTS_BACKUP}
for DNS in ${SIMUL_HOSTS}; do
echo "127.0.0.1 ${DNS}" >> /etc/hosts
done
@@ -199,7 +199,7 @@ done
# Backup the current docker registry settings
if [ -f ~/.docker/config.json ]; then
DOCKER_CONF_BACKUP="$(eval ${TIMESTAMP}_config.json.bk)"
- mv ~/.docker/config.json "~/.docker/${DOCKER_CONF_BACKUP}"
+ mv ~/.docker/config.json ~/.docker/${DOCKER_CONF_BACKUP}
fi
#################################
@@ -344,10 +344,10 @@ echo "Stopping Nexus and returning backups"
docker stop ${NEXUS_CONT_ID} > /dev/null
# Return backed up configuration files
-mv -f "/etc/${HOSTS_BACKUP}" /etc/hosts
+mv -f /etc/${HOSTS_BACKUP} /etc/hosts
-if [ -f "~/.docker/${DOCKER_CONF_BACKUP}" ]; then
- mv -f "~/.docker/${DOCKER_CONF_BACKUP}" ~/.docker/config.json
+if [ -f ~/.docker/${DOCKER_CONF_BACKUP} ]; then
+ mv -f ~/.docker/${DOCKER_CONF_BACKUP} ~/.docker/config.json
fi
# Return default settings