diff options
Diffstat (limited to 'regress/reconfigure.sh')
-rw-r--r-- | regress/reconfigure.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/regress/reconfigure.sh b/regress/reconfigure.sh new file mode 100644 index 000000000..ba6dbc6f5 --- /dev/null +++ b/regress/reconfigure.sh | |||
@@ -0,0 +1,35 @@ | |||
1 | # $OpenBSD: reconfigure.sh,v 1.2 2003/06/21 09:14:05 markus Exp $ | ||
2 | # Placed in the Public Domain. | ||
3 | |||
4 | tid="simple connect after reconfigure" | ||
5 | |||
6 | # we need the full path to sshd for -HUP | ||
7 | case $SSHD in | ||
8 | /*) | ||
9 | # full path is OK | ||
10 | ;; | ||
11 | *) | ||
12 | # otherwise make fully qualified | ||
13 | SSHD=$OBJ/$SSHD | ||
14 | esac | ||
15 | |||
16 | start_sshd | ||
17 | |||
18 | $SUDO kill -HUP `cat $PIDFILE` | ||
19 | sleep 1 | ||
20 | |||
21 | trace "wait for sshd to restart" | ||
22 | i=0; | ||
23 | while [ ! -f $PIDFILE -a $i -lt 10 ]; do | ||
24 | i=`expr $i + 1` | ||
25 | sleep $i | ||
26 | done | ||
27 | |||
28 | test -f $PIDFILE || fatal "sshd did not restart" | ||
29 | |||
30 | for p in 1 2; do | ||
31 | ${SSH} -o "Protocol=$p" -F $OBJ/ssh_config somehost true | ||
32 | if [ $? -ne 0 ]; then | ||
33 | fail "ssh connect with protocol $p failed after reconfigure" | ||
34 | fi | ||
35 | done | ||