diff --git a/qemu b/qemu index a72899c..b64678d 100755 --- a/qemu +++ b/qemu @@ -34,7 +34,7 @@ function selectDrbdDevices() { function setRole() { role=$1; - resourceName=$(echo $2 | sed -e 's|^dev="/dev/drbd/by-res/\(.*\)"|\1|'); + resourceName=$(echo $2 | sed -e 's|^dev="/dev/drbd/by-res/\+\([^/]\+\).*\?"|\1|'); for i in $(seq $MAX_ATTEMPTS); do #echo "attempt $i: drbdadm $role $resourceName" >>/var/log/libvirt/hook-qemu.log /sbin/drbdadm $role $resourceName && return;