From owner-freebsd-bugs@FreeBSD.ORG Sun May 31 19:50:04 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A41D81065673 for ; Sun, 31 May 2009 19:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 90EC58FC1C for ; Sun, 31 May 2009 19:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4VJo4Kb071718 for ; Sun, 31 May 2009 19:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4VJo4N9071714; Sun, 31 May 2009 19:50:04 GMT (envelope-from gnats) Date: Sun, 31 May 2009 19:50:04 GMT Message-Id: <200905311950.n4VJo4N9071714@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Jilles Tjoelker Cc: Subject: Re: bin/129566: behavioral change of "read" builtin for sh(1) on 8-CURRENT [regression] X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jilles Tjoelker List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2009 19:50:05 -0000 The following reply was made to PR bin/129566; it has been noted by GNATS. From: Jilles Tjoelker To: bug-followup@FreeBSD.org, mike@jellydonunt.org Cc: Subject: Re: bin/129566: behavioral change of "read" builtin for sh(1) on 8-CURRENT [regression] Date: Sun, 31 May 2009 21:47:57 +0200 I have committed another change. The timeout in the read builtin now applies to the entire read, not the first character, and the weirdness is gone. I suggest changing the script as follows: #!/bin/sh set -x DEFINT=vr0 DEFIP=192.168.0.1 DEFMASK=255.255.255.0 if read -t 5 -p "Press Enter now if you want to configure the network: " dummy; then read -p "Enter network interface [$DEFINT]: " INT read -p "Enter IP address [$DEFIP]: " IP read -p "Enter netmask [$DEFMASK]: " MASK else echo 'Using defaults' fi echo ${INT:=$DEFINT} : ${IP:=$DEFIP}/${MASK:=$DEFMASK} This should work well on both 8.x and older versions. -- Jilles Tjoelker