summaryrefslogtreecommitdiffstats
path: root/debian/tests/stonith-suicide
blob: 616d36237821fe221ac52a592dffd86c227c491b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -e

if [ "$AUTOPKGTEST_REBOOT_MARK" = fenced ]; then
    echo "fence was successfull"
    exit 0
fi

echo "=== list ==="
stonith -L

printf "\n=== metadata ===\n"
stonith -t suicide -m

printf "\n=== status ===\n"
stonith -d -t suicide -S -l 2>&1

printf "\n=== reset ===\n"
/tmp/autopkgtest-reboot-prepare fenced
sync
stonith -d -t suicide -T reset $(hostname)