File add_phy_to_block-drbd.diff of Package drbd.1187

The type written to xenstore by libxl when attaching a drbd backend is
"phy", not "drbd", so handle this case also.

Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>

Index: drbd-8.4.4.7/scripts/block-drbd
===================================================================
--- drbd-8.4.4.7.orig/scripts/block-drbd
+++ drbd-8.4.4.7/scripts/block-drbd
@@ -250,7 +250,7 @@ case "$command" in
     fi
 
     case $t in 
-      drbd)
+      drbd|phy)
         drbd_resource=$p
         drbd_role="$(drbdadm role $drbd_resource)"
         drbd_lrole="${drbd_role%%/*}"
@@ -278,7 +278,7 @@ case "$command" in
 
   remove)
     case $t in 
-      drbd)
+      drbd|phy)
         p=$(xenstore_read "$XENBUS_PATH/params")
         drbd_resource=$p
         drbd_role="$(drbdadm role $drbd_resource)"
openSUSE Build Service is sponsored by