diff options
author | 2014-07-20 20:08:44 +0000 | |
---|---|---|
committer | 2014-07-20 20:08:44 +0000 | |
commit | edcbee3671a8d3fad448305d92f5a5b1279e564d (patch) | |
tree | f43b168fed0b556d2afbc9568c639f518d806428 | |
parent | look up correct dev_t. This matters for the case where a device is (diff) | |
download | wireguard-openbsd-edcbee3671a8d3fad448305d92f5a5b1279e564d.tar.xz wireguard-openbsd-edcbee3671a8d3fad448305d92f5a5b1279e564d.zip |
if we think this is a laptop (wsdisplay.....) ask a lidsuspend
question. Let's see who whines.
-rw-r--r-- | distrib/miniroot/install.sub | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 746f349cbdf..ac1a98fbb6a 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.783 2014/07/20 18:13:22 deraadt Exp $ +# $OpenBSD: install.sub,v 1.784 2014/07/20 20:08:44 deraadt Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback # All rights reserved. @@ -1821,6 +1821,13 @@ apply() >>/mnt/etc/sysctl.conf fi + if [[ -n $lidsuspend ]]; then + [[ ! -f /mnt/etc/sysctl.conf ]] && \ + echo "# created during install" >/mnt/etc/sysctl.conf + echo "machdep.lidsuspend=1 # Try to suspend on lid close" \ + >>/mnt/etc/sysctl.conf + fi + if [[ $xdm == y && -x /mnt/usr/X11R6/bin/xdm ]]; then echo "xdm_flags= # enabled during install" \ >>/mnt/etc/rc.conf.local @@ -1853,6 +1860,7 @@ questions() { aperture= xdm= + lidsuspend= if [[ -n $DISPLAY ]]; then [[ -n $(scan_dmesg '/^vga.*: aperture needed/p') ]] && ask_yn "Do you expect to run the X Window System?" yes && @@ -1862,6 +1870,10 @@ questions() { ask_yn "Do you want the X Window System to be started by xdm(1)?" xdm=$resp fi + if [[ -n $MDLID ]]; then + ask_yn "Do you want to suspend on lid close?" yes && \ + lidsuspend=$resp + fi fi if [[ -n $CDEV ]]; then |