diff options
Diffstat (limited to 'tools/hotplug/Linux')
-rw-r--r-- | tools/hotplug/Linux/block | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/hotplug/Linux/block b/tools/hotplug/Linux/block index 8d2ee9d213..da26e221dc 100644 --- a/tools/hotplug/Linux/block +++ b/tools/hotplug/Linux/block @@ -206,13 +206,6 @@ and so cannot be mounted ${m2}${when}." t=$(xenstore_read_default "$XENBUS_PATH/type" 'MISSING') -p=$(xenstore_read "$XENBUS_PATH/params") -mode=$(xenstore_read "$XENBUS_PATH/mode") -if [ -b "$p" ]; then - truetype="phy" -elif [ -f "$p" ]; then - truetype="file" -fi case "$command" in add) @@ -224,11 +217,16 @@ case "$command" in exit 0 fi + if [ -n "$t" ] + then + p=$(xenstore_read "$XENBUS_PATH/params") + mode=$(xenstore_read "$XENBUS_PATH/mode") + fi FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id") FRONTEND_UUID=$(xenstore_read_default \ "/local/domain/$FRONTEND_ID/vm" 'unknown') - case $truetype in + case $t in phy) dev=$(expand_dev $p) @@ -321,7 +319,7 @@ mount it read-write in a guest domain." ;; remove) - case $truetype in + case $t in phy) exit 0 ;; |