Files
xen/tools/examples/blktap
T
Alastair Tse b2bfd9596f Switch hotplug scripts to use /bin/bash rather than /bin/sh.
Hotplug scripts include certain bash-isms that are not supported under
some distros' default shell (eg. Ubuntu 6.10's use of dash)

Signed-off-by: Alastair Tse <atse@xensource.com>
2007-01-04 14:25:58 +00:00

30 lines
548 B
Bash

#!/bin/bash
# Copyright (c) 2005, XenSource Ltd.
dir=$(dirname "$0")
. "$dir/xen-hotplug-common.sh"
. "$dir/block-common.sh"
findCommand "$@"
t=$(xenstore_read_default "$XENBUS_PATH/type" 'MISSING')
if [ -n "$t" ]
then
p=$(xenstore_read "$XENBUS_PATH/params")
# if we have a ':', chew from head including :
if echo $p | grep -q \:
then
p=${p#*:}
fi
fi
file=$(readlink -f "$p") || ebusy "$p does not exist."
if [ "$command" = 'add' ]
then
[ -e "$file" ] || { ebusy $file does not exist; }
success
fi
exit 0