diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-03-09 15:06:37 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-03-09 15:06:37 +0000 |
commit | c2cd982be8f5e20eb353b303b4a92e49cb6ed97c (patch) | |
tree | 29c3e22d83590824d3c75bfc242a97bf744b8c9c /distrib/miniroot/install.sub | |
parent | 866c92b182a22fce8a88fc3281e2b2ddc95a54d2 (diff) |
Tweak default set selection so X sets are in the default list when
/etc/X11 already exists. So if you install X to a headless machine
and then upgrade you don't have to remember to add X sets.
Idea from landry@ who installs to a lot of ports boxen.
ok halex@ beck@ deraadt@
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r-- | distrib/miniroot/install.sub | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 280a7a5685c..556455f0178 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.598 2010/03/04 02:07:55 krw Exp $ +# $OpenBSD: install.sub,v 1.599 2010/03/09 15:06:36 krw 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 @@ -1017,6 +1017,10 @@ install_files() { for _f in $THESETS; do isin $_f $_files || continue; _sets=$(addel $_f $_sets) + if [[ -z $DISPLAY && ! -d /mnt/etc/X11 ]]; then + # No displays and X isn't installed ==> skip X sets + isin ${_f%${VERSION}.tgz} xbase xetc xshare xfont xserv && continue + fi isin $_f $DEFAULTSETS "site$VERSION-$(hostname -s).tgz" && \ _get_sets=$(addel $_f $_get_sets) done @@ -1891,10 +1895,6 @@ THESETS="bsd bsd.rd bsd.mp $MDSETS" for _set in base etc misc comp man game xbase xetc xshare xfont xserv site ; do [[ $MODE == upgrade && ( $_set == etc || $_set == xetc ) ]] && continue THESETS="$THESETS ${_set}${VERSION}.tgz" - if [[ -z $DISPLAY ]]; then - # If we have no displays, skip the X sets - isin $_set xbase xetc xshare xfont xserv site && continue - fi isin $_set site && continue DEFAULTSETS="$DEFAULTSETS ${_set}${VERSION}.tgz" done |