diff options
author | 2018-08-19 20:01:38 +0000 | |
---|---|---|
committer | 2018-08-19 20:01:38 +0000 | |
commit | f3ce78a0b0cd535666f1154485ddb91b1a687dd1 (patch) | |
tree | 0a2d3a6efa091549ccffc006a8169b31d35b4875 | |
parent | do not print horizontal lines inside vertical spans (diff) | |
download | wireguard-openbsd-f3ce78a0b0cd535666f1154485ddb91b1a687dd1.tar.xz wireguard-openbsd-f3ce78a0b0cd535666f1154485ddb91b1a687dd1.zip |
If /etc/installurl doesn't exist, install a default one pointing to
cdn.openbsd.org. This way, people doing installs without network
access also get working pkg_add and syspatch experience out of the box.
Idea from tj, supported by deraadt and job
ok halex
-rw-r--r-- | distrib/miniroot/install.sub | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index cdbc02b1fb9..4bd08975688 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1098 2018/07/10 14:22:36 rpe Exp $ +# $OpenBSD: install.sub,v 1.1099 2018/08/19 20:01:38 tb Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -2712,8 +2712,9 @@ finish_up() { fi # Create /etc/installurl if it does not yet exist. - if [[ -n $INSTALL_URL && ! -f /mnt/etc/installurl ]]; then - echo "$INSTALL_URL" >/mnt/etc/installurl + if [[ ! -f /mnt/etc/installurl ]]; then + echo "${INSTALL_URL:-https://cdn.openbsd.org/pub/OpenBSD}" \ + >/mnt/etc/installurl fi echo -n "Making all device nodes..." |