#!/bin/sh

set -e

# Corosync did not start if the test container is unprivileged:
printf 'system.allow_knet_handle_fallback: yes\n' >>/etc/corosync/corosync.conf
service corosync start

OUTPUT="${AUTOPKGTEST_ARTIFACTS:-.}/cfgtool.txt"

corosync-cfgtool -s >"$OUTPUT"
cat "$OUTPUT"
grep -q '^[[:blank:]]*nodeid:[[:blank:]]*1:[[:blank:]]*localhost$' "$OUTPUT"
