summaryrefslogtreecommitdiff
path: root/regress/reconfigure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/reconfigure.sh')
-rw-r--r--regress/reconfigure.sh31
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
4tid="simple connect after reconfigure" 4tid="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
7case $SSHD in 7if 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
14esac 14 SSHD=$OBJ/$SSHD
15 esac
16fi
15 17
16start_sshd 18start_sshd
17 19
20trace "connect before restart"
21for 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
26done
27
18PID=`$SUDO cat $PIDFILE` 28PID=`$SUDO cat $PIDFILE`
19rm -f $PIDFILE 29rm -f $PIDFILE
20$SUDO kill -HUP $PID 30$SUDO kill -HUP $PID
@@ -28,7 +38,8 @@ done
28 38
29test -f $PIDFILE || fatal "sshd did not restart" 39test -f $PIDFILE || fatal "sshd did not restart"
30 40
31for p in 1 2; do 41trace "connect after restart"
42for 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"