1 # $OpenBSD: reconfigure.sh,v 1.9 2021/06/10 09:46:28 dtucker Exp $
2 # Placed in the Public Domain.
4 tid="simple connect after reconfigure"
6 # we need the full path to sshd for -HUP
7 if test "x$USE_VALGRIND" = "x" ; then
13 # otherwise make fully qualified
20 trace "connect before restart"
21 ${SSH} -F $OBJ/ssh_config somehost true
23 fail "ssh connect with failed before reconfigure"
26 PID=`$SUDO cat $PIDFILE`
30 trace "wait for sshd to restart"
32 while [ ! -f $PIDFILE -a $i -lt 10 ]; do
37 test -f $PIDFILE || fatal "sshd did not restart"
39 trace "connect after restart"
40 ${SSH} -F $OBJ/ssh_config somehost true
42 fail "ssh connect with failed after reconfigure"
45 trace "reconfigure with active clients"
46 ${SSH} -F $OBJ/ssh_config somehost sleep 10 # authenticated client
47 ${NC} -d 127.0.0.1 $PORT >/dev/null & # unauthenticated client
48 PID=`$SUDO cat $PIDFILE`
52 trace "wait for sshd to restart"
54 while [ ! -f $PIDFILE -a $i -lt 10 ]; do
59 test -f $PIDFILE || fatal "sshd did not restart"
61 trace "connect after restart with active clients"
62 ${SSH} -F $OBJ/ssh_config somehost true
64 fail "ssh connect with failed after reconfigure"