summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-05-27 11:49:29 -0300
committerRenato Botelho <renato@netgate.com>2016-05-27 11:49:52 -0300
commit2c056b08d713d49b26f6a4f47be2258d1375cb7a (patch)
treea5903cd9e79868a8a73d9aeed37bf57a956d0839 /tools
parent0458a1fdf6cb10479038138bc3a84ab6822f16d3 (diff)
downloadpfsense-2c056b08d713d49b26f6a4f47be2258d1375cb7a.zip
pfsense-2c056b08d713d49b26f6a4f47be2258d1375cb7a.tar.gz
Send .real* directories first to final server
Diffstat (limited to 'tools')
-rw-r--r--tools/builder_common.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index f8cb207..edfb05f 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -1946,11 +1946,28 @@ pkg_repo_rsync() {
fi
if [ -n "${_IS_RELEASE}" -o "${_repo_path_param}" = "${CORE_PKG_PATH}" ]; then
+ # Send .real* directories first to prevent having a broken repo while transfer happens
local _cmd="rsync -Have \"ssh -p ${PKG_FINAL_RSYNC_SSH_PORT}\" \
+ --timeout=60 ${PKG_RSYNC_DESTDIR}/./${_repo_base%%-core}* \
+ --include=\"/*\" --include=\"*/.real*\" --include=\"*/.real*/*\" \
+ --exclude=\"*\" \
+ ${PKG_FINAL_RSYNC_USERNAME}@${PKG_FINAL_RSYNC_HOSTNAME}:${PKG_FINAL_RSYNC_DESTDIR}"
+
+ echo -n ">>> Sending updated packages to ${PKG_FINAL_RSYNC_HOSTNAME}... " | tee -a ${_logfile}
+ if script -aq ${_logfile} ssh -p ${PKG_RSYNC_SSH_PORT} \
+ ${PKG_RSYNC_USERNAME}@${PKG_RSYNC_HOSTNAME} ${_cmd} >/dev/null 2>&1; then
+ echo "Done!" | tee -a ${_logfile}
+ else
+ echo "Failed!" | tee -a ${_logfile}
+ echo ">>> ERROR: An error occurred sending repo to final hostname"
+ print_error_pfS
+ fi
+
+ _cmd="rsync -Have \"ssh -p ${PKG_FINAL_RSYNC_SSH_PORT}\" \
--timeout=60 --delete-delay ${PKG_RSYNC_DESTDIR}/./${_repo_base%%-core}* \
${PKG_FINAL_RSYNC_USERNAME}@${PKG_FINAL_RSYNC_HOSTNAME}:${PKG_FINAL_RSYNC_DESTDIR}"
- echo -n ">>> Sending updated repositories to ${PKG_FINAL_RSYNC_HOSTNAME}... " | tee -a ${_logfile}
+ echo -n ">>> Sending updated repositories metadata to ${PKG_FINAL_RSYNC_HOSTNAME}... " | tee -a ${_logfile}
if script -aq ${_logfile} ssh -p ${PKG_RSYNC_SSH_PORT} \
${PKG_RSYNC_USERNAME}@${PKG_RSYNC_HOSTNAME} ${_cmd} >/dev/null 2>&1; then
echo "Done!" | tee -a ${_logfile}
OpenPOWER on IntegriCloud