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
|