Added additional debug information for symlink function

This commit is contained in:
mboelen 2014-10-13 19:51:20 +02:00
parent 6f893ea3b4
commit badd27ac7e

View File

@ -1185,7 +1185,9 @@
if [ ! "${READLINKBINARY}" = "" ]; then if [ ! "${READLINKBINARY}" = "" ]; then
tFILE=`${READLINKBINARY} -f ${sFILE}` tFILE=`${READLINKBINARY} -f ${sFILE}`
# Check if we can find the file now # Check if we can find the file now
if [ -f ${tFILE} ]; then if [ "${tFILE}" = "" ]; then
logtext "Result: command did not return any value"
elif [ -f ${tFILE} ]; then
sFILE="${tFILE}" sFILE="${tFILE}"
logtext "Result: symlink found, pointing to file ${sFILE}" logtext "Result: symlink found, pointing to file ${sFILE}"
FOUNDPATH=1 FOUNDPATH=1
@ -1223,7 +1225,11 @@
logtext "Result: file ${tFILE} in ${tDIR} not found" logtext "Result: file ${tFILE} in ${tDIR} not found"
fi fi
fi fi
else
logtext "Result: no readlink binary available to determine symlink location"
fi fi
else
logtext "Result: file not a symlink"
fi fi
# Now check if our new location is actually a file or directory destination # Now check if our new location is actually a file or directory destination
if [ -L ${sFILE} ]; then if [ -L ${sFILE} ]; then