看板 FB_bugs 關於我們 聯絡資訊
The following reply was made to PR bin/129566; it has been noted by GNATS. From: Jilles Tjoelker <jilles@stack.nl> 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 _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"