mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Fix blktap script for versions of readlink command that do not handle
regular files. Signed-off-by: Ben Guthro <bguthro@virtualiron.com> Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>
This commit is contained in:
1 parent
c028cc106a
commit
c0e85ece47
1 file changed
+7
-1
@@ -69,7 +69,13 @@ then
|
||||
p=${p#*:}
|
||||
fi
|
||||
fi
|
||||
file=$(readlink -f "$p") || ebusy "$p does not exist."
|
||||
# some versions of readlink cannot be passed a regular file
|
||||
if [ -L "$p" ]; then
|
||||
file=$(readlink -f "$p") || ebusy "$p link does not exist."
|
||||
else
|
||||
[ -f "$p" ] || { ebusy "$p file does not exist." }
|
||||
file="$p"
|
||||
fi
|
||||
|
||||
if [ "$mode" != '!' ]
|
||||
then
|
||||
|
||||