File: drbd-wait-promotable.sh

package info (click to toggle)
drbd-utils 9.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,760 kB
  • sloc: ansic: 48,975; xml: 11,553; cpp: 9,842; sh: 4,575; makefile: 1,031; perl: 353; ruby: 43
file content (9 lines) | stat: -rwxr-xr-x 241 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
#!/bin/bash
# Waits for a resource to become promotable, then exits.

while read line ; do
  [[ $line = *may_promote:yes* ]] && exit 0;
done < <( exec drbdsetup events2 "$1" )

# In case drbdsetup encountered issues, report an error.
exit 1