Fix inc PATH for cp and inc log

This commit is contained in:
Victor LABORIE 2017-01-12 10:40:07 +01:00
parent ebedc7b06c
commit a0051afa41

13
bkctld
View file

@ -409,17 +409,14 @@ sub_inc() {
mkdir -p ${INCDIR}/${jail} mkdir -p ${INCDIR}/${jail}
if [ ! -d "${inc}" ]; then if [ ! -d "${inc}" ]; then
inc_log=$( inc_log=$(
echo "Make $date inc of $jail :" start=$(date +"%H:%M:%S")
start=$(date +"%d-%m-%Y ; %H:%M")
if ( check_btrfs ); then if ( check_btrfs ); then
btrfs subvolume snapshot ${JAILDIR}/$jail $inc btrfs subvolume snapshot ${JAILDIR}/$jail $inc > /dev/null
else else
echo -n "hard copy $jail begins at : $start" cp -alx ${JAILDIR}/${jail}/ $inc
cp -alx ${JAILDIR}/${jail}/ ${INCDIR}${jail}/$date
echo -n "hard copy $jail ends at : $end "
fi fi
end=$(date +"%d-%m-%Y ; %H:%M") end=$(date +"%H:%M:%S")
echo "Inc $date of $jail created" echo "Inc $date of $jail created (Start at $start / End at $end)"
) )
echo "${inc_log}" echo "${inc_log}"
incs_logs=$(echo "${incs_logs}"; echo "${inc_log}") incs_logs=$(echo "${incs_logs}"; echo "${inc_log}")