-# $OpenBSD: install.sub,v 1.779 2014/07/13 13:53:36 rpe Exp $
+# $OpenBSD: install.sub,v 1.780 2014/07/13 21:24:43 rpe Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
# All rights reserved.
>/mnt/etc/ntpd.conf
fi
- if [[ $x11 == y ]]; then
- sed "/^#\(machdep\.allowaperture=${MDXAPERTURE}\)/s//\1 /" \
+ if [[ -n $aperture ]]; then
+ sed "s/^#\(machdep\.allowaperture=$aperture\)/\1 /" \
/mnt/etc/sysctl.conf >/tmp/sysctl.conf
cp /tmp/sysctl.conf /mnt/etc/sysctl.conf
fi
}
questions() {
- local _d _xdmask=y _def
+ local _d
ask_yn "Start sshd(8) by default?" yes
sshd=$resp
ntpd_server=$resp
fi
- def=no
- [[ -n $DISPLAY ]] && def=yes
- if [[ -n $MDXAPERTURE ]]; then
- ask_yn "Do you expect to run the X Window System?" $def
- x11=$resp
- # if aperture was n, do not ask for xdm
- _xdmask=$resp
- fi
+ aperture=
+ xdm=
+ if [[ -n $DISPLAY ]]; then
+ [[ -n $(scan_dmesg '/^vga1: aperture needed/p') ]] &&
+ ask_yn "Do you expect to run the X Window System?" yes &&
+ aperture=$MDXAPERTURE
- if [[ -n $MDXDM && $_xdmask == y ]]; then
- ask_yn "Do you want the X Window System to be started by xdm(1)?"
- xdm=$resp
+ if [[ -n $MDXDM ]]; then
+ ask_yn "Do you want the X Window System to be started by xdm(1)?"
+ xdm=$resp
+ fi
fi
if [[ -n $CDEV ]]; then