From: halex Date: Tue, 10 Jul 2018 09:33:34 +0000 (+0000) Subject: simplify and properly quote the loading of soii key generation material, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=728597f2620e0203df050696c35932ed8bbcf0b3;p=openbsd simplify and properly quote the loading of soii key generation material, and move it into enable_network() ok florian tb, long ago --- diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index de3988484aa..8ef1faa4e74 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1096 2018/07/09 16:12:23 rpe Exp $ +# $OpenBSD: install.sub,v 1.1097 2018/07/10 09:33:34 halex Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -2351,6 +2351,9 @@ enable_network() { echo "127.0.0.1\tlocalhost" >/tmp/i/hosts echo "::1\t\tlocalhost" >>/tmp/i/hosts + _f=/mnt/etc/soii.key + [[ -f $_f ]] && sysctl "net.inet6.ip6.soiikey=$(<$_f)" + # Set the address for the loopback interface. Bringing the # interface up, automatically invokes the IPv6 address ::1. ifconfig lo0 inet 127.0.0.1/8 @@ -3122,9 +3125,6 @@ do_upgrade() { ALLSETS="$ALLSETS site$VERSION-$(hostname -s).tgz" export PS1='\h# ' - _f=/mnt/etc/soii.key - [[ ! -f $_f ]] || sysctl net.inet6.ip6.soiikey=$(<$_f) - # Configure the network. enable_network