Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solving Missing Librarys hopfully once and for alle on Duply,
SInce it uses THe Library depending on your config so hopefully it would work with all Backup Pathods
- Loading branch information
root
committed
Oct 11, 2014
1 parent
077f176
commit b092725
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This file is part of Relax and Recover, licensed under the GNU General | ||
# Public License. Refer to the included LICENSE for full text of license. | ||
|
||
# 25_find_all_libs.sh (use 20 as with 10 we would loose our DUPLY_PROFILE setting) | ||
|
||
# purpose is to see we're using duply wrapper and if there is an existing profile defined | ||
# if that is the case then we define an internal variable DUPLY_PROFILE="profile" | ||
# the profile is in fact a directory name containing the conf file and exclude file | ||
# we shall copy this variable, if defined, to our rescue.conf file | ||
which strace > /dev/null 2>&1 | ||
if [ "x$BACKUP_PROG" == 'xduply' ] && [ $? -eq 0 ]; then | ||
|
||
FILES=`strace -Ff -e open duply $DUPLY_PROFILE status 2>&1 1>/dev/null|grep -v '= -1'|grep -i open|grep -v "open resumed" |cut -d \" -f 2|sort -u` | ||
for name in $FILES; do | ||
if [ -f $name ] || [ -L $name ]; then | ||
DATEI=`readlink -f $name` | ||
LIB=`file $DATEI|grep "shared object"|cut -d \: -f 1` | ||
if [ "x$LIB" != "x" ]; then | ||
LIBS=( | ||
"${LIBS[@]}" | ||
$LIB | ||
) | ||
fi | ||
fi | ||
done | ||
sorted_unique_LIBS=$(echo "${LIBS[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ') | ||
LIBS=$sorted_unique_LIBS | ||
fi |