1# $OpenBSD: reconfigure.sh,v 1.2 2003/06/21 09:14:05 markus Exp $ 2# Placed in the Public Domain. 3 4tid="simple connect after reconfigure" 5 6# we need the full path to sshd for -HUP 7SSHD=/usr/sbin/sshd 8 9start_sshd 10 11$SUDO kill -HUP `cat $PIDFILE` 12sleep 1 13 14trace "wait for sshd to restart" 15i=0; 16while [ ! -f $PIDFILE -a $i -lt 10 ]; do 17 i=`expr $i + 1` 18 sleep $i 19done 20 21test -f $PIDFILE || fatal "sshd did not restart" 22 23for p in 1 2; do 24 ${SSH} -o "Protocol=$p" -F $OBJ/ssh_config somehost true 25 if [ $? -ne 0 ]; then 26 fail "ssh connect with protocol $p failed after reconfigure" 27 fi 28done 29