From badd27ac7e84cacbb183278ec204f1817c31ff48 Mon Sep 17 00:00:00 2001 From: mboelen Date: Mon, 13 Oct 2014 19:51:20 +0200 Subject: [PATCH] Added additional debug information for symlink function --- include/functions | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/functions b/include/functions index caaa71ec..cba3cfad 100644 --- a/include/functions +++ b/include/functions @@ -1185,7 +1185,9 @@ if [ ! "${READLINKBINARY}" = "" ]; then tFILE=`${READLINKBINARY} -f ${sFILE}` # 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}" logtext "Result: symlink found, pointing to file ${sFILE}" FOUNDPATH=1 @@ -1223,7 +1225,11 @@ logtext "Result: file ${tFILE} in ${tDIR} not found" fi fi + else + logtext "Result: no readlink binary available to determine symlink location" fi + else + logtext "Result: file not a symlink" fi # Now check if our new location is actually a file or directory destination if [ -L ${sFILE} ]; then