More preparations for removal of pax

Use pwd -P to get real path
This commit is contained in:
Nico Schottelius 2006-10-15 16:31:16 +02:00
parent 2060baa71a
commit ec6bb69c75
4 changed files with 8 additions and 13 deletions

View file

@ -381,22 +381,14 @@ while [ "$i" -lt "$no_sources" ]; do
#
# make an absolute path, perhaps $CCOLLECT_CONF is relative!
#
abs_destination_dir=$(cd $destination_dir; pwd)
abs_destination_dir=$(cd $destination_dir; pwd -P)
# only copy if a directory exists
if [ "$last_dir" ]; then
echo "$($DDATE) Hard linking..."
#cd "$last_dir"
#pax -rwl -p e $VVERBOSE . "$abs_destination_dir"
last_dir=$(cd "$last_dir"; pwd -P)
rsync_hardlink="--link-dest=\"$last_dir\""
fi
if [ $? -ne 0 ]; then
echo -n "$($DDATE) Creating/cloning backup directory failed."
echo " Skipping backup."
exit 1
fi
#
# the rsync part
# options partly stolen from rsnapshot
@ -404,11 +396,13 @@ while [ "$i" -lt "$no_sources" ]; do
echo "$($DDATE) Transferring files..."
set -x
rsync -a --delete --numeric-ids --relative --delete-excluded \
$rsync_hardlink \
$VERBOSE $EXCLUDE $SUMMARY $RSYNC_EXTRA \
"$source" "$abs_destination_dir"
set +x
if [ "$?" -ne 0 ]; then
echo "rsync reported error $?. The backup may be broken (see rsync errors)"
fi

View file

@ -1,5 +1,5 @@
#!/bin/cat
######################################################################
If you see this content, post_exec was executed.
If you see this content, post_exec was executed. (general post_exec)
######################################################################

View file

@ -1,3 +1,4 @@
#!/bin/cat
If you see this content, pre_exec was executed.
(general pre_exec, not source dependent)

View file

@ -1 +1 @@
/home/nico/backupdir/testsource1
/home/user/nico/backupdir/testsource1