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