File modified: install.sub
Problem: I commonly run OpenBSD as a VM under a Linux host to do testing of
various bits, and to do builds of the stable release for my OpenBSD
fw/router. The VM host infrastructure (libvirt and kvm/qemu) requires a
display to view the OpenBSD console. This requirement has the downstream
effect of creating a wsdisplay0 device on the VM, which causes the OpenBSD
install to auto-select the X packages (xbase, xshare, etc) during package
selection. This happens even if I choose 'no' when asked 'Do you expect to
run the X windows system?"
What my diff does: Even if a display (wsdisplay0) is found, if the user
chooses not to install X, don't auto-select the X packages.
I tested this both ways, saying yes/no to the above question, and came out
with what I expected the new logic to do.
Feel free to flame, explain, or generally malign, any logic or unforseen
consequences of this diff.
Cheers,
Jeff
Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.631
diff -u -r1.631 install.sub
--- install.sub 22 Nov 2010 14:10:42 -0000 1.631
+++ install.sub 31 Dec 2010 16:02:50 -0000
@@ -1103,7 +1103,7 @@
for _f in $THESETS; do
isin $_f $_files || continue;
_sets=$(addel $_f $_sets)
- if [[ -z $DISPLAY && ! -d /mnt/etc/X11 ]]; then
+ if [[ -z $DISPLAY && ! -d /mnt/etc/X11 ]] || [[ $x11 == n
]]; then
# No displays and X isn't installed ==> skip X sets
isin ${_f%${VERSION}.tgz} xbase xetc xshare xfont
xserv && continue
fi