diff options
author | 2013-12-06 00:42:45 +0000 | |
---|---|---|
committer | 2013-12-06 00:42:45 +0000 | |
commit | 049f3b9f160a8cc96de32be7b6bef74a05531d31 (patch) | |
tree | f4ca088b259c02526fc5da030f1f728368cbfc1d | |
parent | fix memory leak in error path in do_readdir(); pointed out by (diff) | |
download | wireguard-openbsd-049f3b9f160a8cc96de32be7b6bef74a05531d31.tar.xz wireguard-openbsd-049f3b9f160a8cc96de32be7b6bef74a05531d31.zip |
Workaround closed stdin in non-interactive mode.
ok deraadt@
-rw-r--r-- | distrib/miniroot/install.sh | 4 | ||||
-rw-r--r-- | distrib/miniroot/install.sub | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index aa20bfc18bb..f49bea0ea56 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sh,v 1.237 2013/12/01 01:54:23 halex Exp $ +# $OpenBSD: install.sh,v 1.238 2013/12/06 00:42:45 rpe Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback @@ -231,7 +231,7 @@ if [[ -s $SERVERLISTALL ]]; then fi # Ensure an enabled console has the correct speed in /etc/ttys. -sed -e "/^console.*on.*secure.*$/s/std\.[0-9]*/std.$(stty speed)/" \ +sed -e "/^console.*on.*secure.*$/s/std\.[0-9]*/std.$(stty speed </dev/console)/" \ /mnt/etc/ttys >/tmp/ttys mv /tmp/ttys /mnt/etc/ttys diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index d8e6298583d..0f6ef5d0351 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.713 2013/12/05 00:44:49 halex Exp $ +# $OpenBSD: install.sub,v 1.714 2013/12/06 00:42:45 rpe Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback @@ -2072,7 +2072,7 @@ DISPLAY=$(scan_dmesg '/^wsdisplay[0-9]* /s/ .*//p') CONSOLE=$(scan_dmesg '/^\([^ ]*\).*: console$/s//\1/p') CONSOLE=${CONSOLE% } -[[ -n $CONSOLE ]] && CSPEED=$(stty speed) +[[ -n $CONSOLE ]] && CSPEED=$(stty speed </dev/console) # Look for the serial device matching the console. If we are not installing # from a serial console, just find the first serial device that could be used @@ -2095,7 +2095,7 @@ done SANESETS="${SANESETS:-bsd} base${VERSION}.tgz etc${VERSION}.tgz" # prepare COLUMNS sanely -COLUMNS=$(stty -a | sed -n '/columns/{s/^.* \([0-9]*\) columns.*$/\1/;p;}') +COLUMNS=$(stty -a </dev/console | sed -n '/columns/{s/^.* \([0-9]*\) columns.*$/\1/;p;}') ((COLUMNS == 0)) && COLUMNS=80 # decide upon an editor |