From 16174562809eb0a4b83f620219d6946807058767 Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 22 Aug 2018 16:53:36 +0000 Subject: [PATCH] Let /etc/installurl default to cdn.openbsd.org if it doesn't exist and no official mirror was used. This way, people doing installs without network access also get working pkg_add and syspatch experience out of the box. Idea from tj ok halex, job (who made it all possible), deraadt --- distrib/miniroot/install.sub | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 6e9a79c1ccb..135dbe70868 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1100 2018/08/19 20:35:51 tb Exp $ +# $OpenBSD: install.sub,v 1.1101 2018/08/22 16:53:36 tb Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -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..." -- 2.20.1