summaryrefslogtreecommitdiff
path: root/system/drbd-utils/patches
diff options
context:
space:
mode:
authorMario Preksavec <mario@slackware.hr>2015-02-25 12:08:00 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-02-28 11:37:12 +0700
commit581a45f2a538110086a7d467d3e53a2a504e2aa4 (patch)
treef165ee8e811b192559b9f21bda0d7455a9639b0c /system/drbd-utils/patches
parentb56f2ce98f4d3d161da182a82d644a172fb7a7ba (diff)
downloadslackbuilds-581a45f2a538110086a7d467d3e53a2a504e2aa4.tar.gz
system/drbd-utils: Fix for Xen physical device paths.
Diffstat (limited to 'system/drbd-utils/patches')
-rw-r--r--system/drbd-utils/patches/xen_handle_physical_device_paths.diff25
1 files changed, 25 insertions, 0 deletions
diff --git a/system/drbd-utils/patches/xen_handle_physical_device_paths.diff b/system/drbd-utils/patches/xen_handle_physical_device_paths.diff
new file mode 100644
index 0000000000..dd36a4af57
--- /dev/null
+++ b/system/drbd-utils/patches/xen_handle_physical_device_paths.diff
@@ -0,0 +1,25 @@
+--- drbd-utils-8.9.1/scripts/block-drbd.orig 2014-07-04 14:23:23.000000000 +0200
++++ drbd-utils-8.9.1/scripts/block-drbd 2015-02-16 02:50:39.257522006 +0100
+@@ -251,6 +251,7 @@
+
+ case $t in
+ drbd|phy)
++ p=${p/*dev*drbd*by-res\/} # Clean physical device paths
+ drbd_resource=$p
+ drbd_role="$(drbdadm role $drbd_resource)"
+ drbd_lrole="${drbd_role%%/*}"
+@@ -280,12 +281,14 @@
+ case $t in
+ drbd|phy)
+ p=$(xenstore_read "$XENBUS_PATH/params")
++ p=${p/*dev*drbd*by-res\/} # Clean physical device paths
+ drbd_resource=$p
+ drbd_role="$(drbdadm role $drbd_resource)"
+ drbd_lrole="${drbd_role%%/*}"
+ drbd_dev="$(drbdadm sh-dev $drbd_resource)"
+
+ if [ "$drbd_lrole" != 'Secondary' ]; then
++ sleep 1 # Sleep for a second just in case
+ drbdadm secondary $drbd_resource
+ fi
+ exit 0