Use rsync during jail conversion

This commit is contained in:
Jose
2020-01-04 15:50:36 -04:00
parent b5c1bc4da1
commit cd5f6ae917
3 changed files with 5 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
======================
Version Description
1.0.33......Use rsync during jail conversion.
1.0.32......Code improvements.
1.0.31......Fix issue with names containing dashes.
1.0.30......Ability to convert thin jail to thick jail.

View File

@@ -812,7 +812,7 @@ thickjail_install()
convert_symlinks()
{
# Work with the symlinks, revert on first cp error.
# Work with the symlinks, revert on first rsync error.
if [ -d "${bastille_releasesdir}/${RELEASE}" ]; then
# Retrieve old symlinks temporarily.
for _link in ${SYMLYNKS}; do
@@ -824,7 +824,7 @@ convert_symlinks()
# Copy new files to destination jail.
for _link in ${SYMLYNKS}; do
if [ ! -d "${_link}" ]; then
cp -a "${bastille_releasesdir}/${RELEASE}/${_link}" "${bastille_jailsdir}/${TARGET}/root/${_link}"
rsync -a "${bastille_releasesdir}/${RELEASE}/${_link}/" "${bastille_jailsdir}/${TARGET}/root/${_link}/"
if [ $? -ne 0 ]; then
revert_convert
fi
@@ -844,7 +844,7 @@ convert_symlinks()
revert_convert()
{
# Revert the conversion on first cp error.
# Revert the conversion on first rsync error.
echo -e "A problem has occurred while copying the files, reverting changes..."
for _link in ${SYMLYNKS}; do
if [ -d "${_link}" ]; then

View File

@@ -1 +1 @@
1.0.32
1.0.33