source: trunk/packages/xen-3.1/xen-3.1/tools/examples/blktap @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 548 bytes
Line 
1#!/bin/bash
2
3# Copyright (c) 2005, XenSource Ltd.
4
5dir=$(dirname "$0")
6. "$dir/xen-hotplug-common.sh"
7. "$dir/block-common.sh"
8
9findCommand "$@"
10
11t=$(xenstore_read_default "$XENBUS_PATH/type" 'MISSING')
12if [ -n "$t" ]
13then
14    p=$(xenstore_read "$XENBUS_PATH/params")
15    # if we have a ':', chew from head including :
16    if echo $p | grep -q \:
17    then
18        p=${p#*:}
19    fi
20fi
21file=$(readlink -f "$p") || ebusy "$p does not exist."
22
23if [ "$command" = 'add' ]
24then
25    [ -e "$file" ] || { ebusy $file does not exist; }
26    success
27fi
28
29exit 0
Note: See TracBrowser for help on using the repository browser.