Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | # Copyright (c) 2005, XenSource Ltd. |
---|
4 | |
---|
5 | dir=$(dirname "$0") |
---|
6 | . "$dir/xen-hotplug-common.sh" |
---|
7 | . "$dir/block-common.sh" |
---|
8 | |
---|
9 | findCommand "$@" |
---|
10 | |
---|
11 | t=$(xenstore_read_default "$XENBUS_PATH/type" 'MISSING') |
---|
12 | if [ -n "$t" ] |
---|
13 | then |
---|
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 |
---|
20 | fi |
---|
21 | file=$(readlink -f "$p") || ebusy "$p does not exist." |
---|
22 | |
---|
23 | if [ "$command" = 'add' ] |
---|
24 | then |
---|
25 | [ -e "$file" ] || { ebusy $file does not exist; } |
---|
26 | success |
---|
27 | fi |
---|
28 | |
---|
29 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.