mirror of
https://github.com/sbopkg/sbopkg
synced 2025-02-10 20:47:56 +01:00
remove -z option from rsync, add 10 second timeout, and provide some basic rsync failure handling; thanks to macavity for the patch.
This commit is contained in:
parent
3718d0bde6
commit
3beaaae870
1 changed files with 17 additions and 6 deletions
|
@ -30,8 +30,8 @@
|
||||||
# Wisehart, slakmagik, Eric Hameleers, Michiel van Wessem, hba, Erik
|
# Wisehart, slakmagik, Eric Hameleers, Michiel van Wessem, hba, Erik
|
||||||
# Hanson, Antoine, ktabic, Ken Roberts, samac, Bert Babington, Murat
|
# Hanson, Antoine, ktabic, Ken Roberts, samac, Bert Babington, Murat
|
||||||
# D. Kadirov, The-spiki, David Somero, LukenShiro, Drew Ames, nille,
|
# D. Kadirov, The-spiki, David Somero, LukenShiro, Drew Ames, nille,
|
||||||
# acidchild, and mancha. This script would not be where it is
|
# acidchild, mancha, and macavity. This script would not be where it
|
||||||
# without the help of these folks. Thank you!
|
# is without the help of these folks. Thank you!
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
SCRIPT=${0##*/}
|
SCRIPT=${0##*/}
|
||||||
|
@ -701,12 +701,23 @@ fi
|
||||||
|
|
||||||
rsync_command () {
|
rsync_command () {
|
||||||
# This function holds the rsync command.
|
# This function holds the rsync command.
|
||||||
/usr/bin/rsync -avz --delete --timeout=5 --exclude="*.sbopkg" \
|
# We do not use -z as this causes heavy CPU load on the server
|
||||||
|
# and has very limited effect when most of the pull is .gz files.
|
||||||
|
# Time out is set to 10 since SBo can be under heavy load at times.
|
||||||
|
/usr/bin/rsync -av --delete --timeout=10 --exclude="*.sbopkg" \
|
||||||
$RSYNCMIRROR/$SLACKVER/ $LOCALREPO/$SLACKVER/
|
$RSYNCMIRROR/$SLACKVER/ $LOCALREPO/$SLACKVER/
|
||||||
echo
|
RSYNC_RETVAL=$?
|
||||||
echo "Rsync with SlackBuilds.org complete."
|
|
||||||
echo
|
|
||||||
rm -rf $TMP/sbopkg_rsync.lck
|
rm -rf $TMP/sbopkg_rsync.lck
|
||||||
|
if [ ! $RSYNC_RETVAL = 0 ]; then
|
||||||
|
echo
|
||||||
|
echo "Rsync with SlackBuilds.org failed."
|
||||||
|
echo "Please try again."
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
echo
|
||||||
|
echo "Rsync with SlackBuilds.org complete."
|
||||||
|
echo
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
rsync_repo () {
|
rsync_repo () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue