diff options
author | Robert Peichaer <rpe@cvs.openbsd.org> | 2017-05-22 19:03:25 +0000 |
---|---|---|
committer | Robert Peichaer <rpe@cvs.openbsd.org> | 2017-05-22 19:03:25 +0000 |
commit | d1683836f7ba5bf34f290205768f82fbb66f275f (patch) | |
tree | 9819dc18c3b1ac9ab0258178f10f5beb3aeae220 /distrib/miniroot/install.sub | |
parent | ebc023062dfe24e7827c4cde8b9680f9d6db96e0 (diff) |
The DISPLAY variable is actually not a global variable as it's used
only once in questions(). Use scan_dmesg() output directly to test
for wsdisplay* in dmesg.boot instead.
Change comment, now that it only refers to setting CONSOLE.
no objection tb@
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r-- | distrib/miniroot/install.sub | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 280aef78c46..48ac5a54ef2 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1006 2017/05/22 17:15:52 rpe Exp $ +# $OpenBSD: install.sub,v 1.1007 2017/05/22 19:03:24 rpe Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -1936,7 +1936,7 @@ questions() { APERTURE= resp= START_XDM= - if [[ -n $DISPLAY ]]; then + if [[ -n $(scan_dmesg '/^wsdisplay[0-9]* /s/ .*//p') ]]; then if [[ -n $(scan_dmesg '/^[a-z]*[01]: aperture needed/p') ]]; then ask_yn "Do you expect to run the X Window System?" yes && APERTURE=$MDXAPERTURE @@ -3094,8 +3094,7 @@ else HTTP_PROTO=http fi -# Scan /var/run/dmesg.boot for interesting devices. -DISPLAY=$(scan_dmesg '/^wsdisplay[0-9]* /s/ .*//p') +# Scan /var/run/dmesg.boot for console device. CONSOLE=$(scan_dmesg '/^\([^ ]*\).*: console$/s//\1/p') [[ -n $CONSOLE ]] && CSPEED=$(stty speed </dev/console) |