diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-08-31 11:10:21 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-08-31 11:10:21 +0100 |
commit | c0e85ece47f9ef2bce69650a9854fe2a1ea7fb6a (patch) | |
tree | b5f0d9fcd13e07cda62ea6ab6ba1c02c56548ce9 /tools | |
parent | c028cc106a4abb57e9f0c199e37073a627de7eb6 (diff) | |
download | xen-c0e85ece47f9ef2bce69650a9854fe2a1ea7fb6a.tar.gz xen-c0e85ece47f9ef2bce69650a9854fe2a1ea7fb6a.tar.bz2 xen-c0e85ece47f9ef2bce69650a9854fe2a1ea7fb6a.zip |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/examples/blktap | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/examples/blktap b/tools/examples/blktap index e4ac40b331..b3a0b63544 100644 --- a/tools/examples/blktap +++ b/tools/examples/blktap @@ -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 |