From cd5f6ae917e8a257e53e51b1b97469f8a4b5d5a0 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 4 Jan 2020 15:50:36 -0400 Subject: [PATCH] Use rsync during jail conversion --- CHANGELOG | 1 + bastille-init | 6 +++--- version | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d6eb9dc..30e28a8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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. diff --git a/bastille-init b/bastille-init index 68e68dd..e825b6d 100755 --- a/bastille-init +++ b/bastille-init @@ -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 diff --git a/version b/version index 15245f3..e8eb7f1 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.0.32 +1.0.33