File: corosync

package info (click to toggle)
sbd 1.5.2-6~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 804 kB
  • sloc: ansic: 5,303; sh: 654; makefile: 119
file content (30 lines) | stat: -rwxr-xr-x 627 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

set -e

# https://bugs.launchpad.net/bugs/1828228
ulimit -H -l unlimited 2>/dev/null || {
        echo "test disabled for unprivileged namespaces"
        exit 77
}

# allow sbd to start without a real watchdog device
if ! [ -e /dev/watchdog ]; then
  sed -i 's|/dev/watchdog|/dev/null|' /etc/default/sbd
fi

# get systemd to pickup the corosync dependency on sbd
if [ -d /run/systemd/system ]; then
  systemctl daemon-reload
fi

# corosync should now also start sbd automatically
service corosync restart

for i in $(seq 1 60); do
  pgrep --list-full sbd && exit 0
  sleep 1
done

echo "sbd failed to start"
exit 1