From ef2b12e218be09e0e0a48f7640edd7701dd95776 Mon Sep 17 00:00:00 2001 From: mboelen Date: Mon, 25 May 2015 23:17:08 +0200 Subject: [PATCH] Added block and character type devices as symlinks --- include/functions | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/functions b/include/functions index e412d7c4..39487967 100644 --- a/include/functions +++ b/include/functions @@ -1300,6 +1300,7 @@ SYMLINK_USE_READLINK=1 logtext "Note: Using real readlink binary to determine symlinks" tFILE=`${READLINKBINARY} -f ${sFILE}` + logtext "Result: readlink shows ${tFILE} as output" fi fi # Check if we can find the file now @@ -1309,6 +1310,14 @@ sFILE="${tFILE}" logtext "Result: symlink found, pointing to file ${sFILE}" FOUNDPATH=1 + elif [ -b ${tFILE} ]; then + sFILE="${tFILE}" + logtext "Result: symlink found, pointing to block device ${sFILE}" + FOUNDPATH=1 + elif [ -c ${tFILE} ]; then + sFILE="${tFILE}" + logtext "Result: symlink found, pointing to character device ${sFILE}" + FOUNDPATH=1 elif [ -d ${tFILE} ]; then sFILE="${tFILE}" logtext "Result: symlink found, pointing to directory ${sFILE}"