use relative path for symbolic-link creation of elasticstack

This commit is contained in:
bigeagle 2016-12-14 21:45:37 +08:00
parent cfe4e2202e
commit 418fe88101

View File

@ -32,8 +32,8 @@ for elsver in "${ELASTIC_VERSION[@]}"; do
apt-download-binary ${apt_url} "stable" "main" "amd64" "${dest_path}" || true apt-download-binary ${apt_url} "stable" "main" "amd64" "${dest_path}" || true
apt-download-binary ${apt_url} "stable" "main" "i386" "${dest_path}" || true apt-download-binary ${apt_url} "stable" "main" "i386" "${dest_path}" || true
ln -sf "${APT_PATH}/${elsver}" "${BASE_PATH}/${elsver}/apt" (cd ${BASE_PATH}/${elsver}; ln -sf ../apt/${elsver} apt)
done done
# # ================ YUM/DNF repos =============================== # # ================ YUM/DNF repos ===============================
@ -63,7 +63,7 @@ if [[ -z ${DRY_RUN:-} ]]; then
reposync -c $cfg -d -p ${YUM_PATH} -e ${cache_dir} reposync -c $cfg -d -p ${YUM_PATH} -e ${cache_dir}
for elsver in ${ELASTIC_VERSION[@]}; do for elsver in ${ELASTIC_VERSION[@]}; do
createrepo --update -v -c ${cache_dir} -o ${YUM_PATH}/elastic-${elsver}/ ${YUM_PATH}/elastic-${elsver}/ createrepo --update -v -c ${cache_dir} -o ${YUM_PATH}/elastic-${elsver}/ ${YUM_PATH}/elastic-${elsver}/
ln -sf ${YUM_PATH}/elastic-${elsver} ${BASE_PATH}/${elsver}/yum (cd ${BASE_PATH}/${elsver}; ln -sf ../yum/elastic-${elsver} yum)
done done
fi fi
rm $cfg rm $cfg