summary refs log tree commit diff
path: root/src/svwaitup.check
blob: a1be802b3e82a55d3717f752b03624db6699b8f1 (plain) (blame)
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
#!/bin/sh
rm -rf "${ctmp}"

svwaitup
echo $?
svwaitup -V
echo $?

mkdir "${ctmp}"
echo '#!/bin/sh' >"${ctmp}"/run
echo 'echo starting' >>"${ctmp}"/run
echo 'exec sleep 14' >>"${ctmp}"/run
chmod 700 "${ctmp}"/run
runsv "${ctmp}" &
sleep 1
test -r "${ctmp}"/supervise/stat || sleep 2
svwaitup "${ctmp}"
echo $?
cat "${ctmp}"/supervise/stat
svwaitup -s2 "${ctmp}"
echo $?
cat "${ctmp}"/supervise/stat
runsvctrl exit "${ctmp}"
wait
echo $?
chpst -2 svwaitup -s2 "${ctmp}"
echo $?
rm -rf "${ctmp}"