#!/bin/sh -
#
-# $OpenBSD: netstart,v 1.226 2022/11/01 10:45:53 kn Exp $
+# $OpenBSD: netstart,v 1.227 2022/11/01 11:18:06 kn Exp $
# Turn off Strict Bourne shell mode.
set +o sh
# Load key material for the generation of IPv6 Semantically Opaque Interface
# Identifiers (SOII) used for SLAAC addresses.
-$PRINT_ONLY || [[ ! -f /etc/soii.key ]] ||
- sysctl -q "net.inet6.ip6.soiikey=$(</etc/soii.key)"
+if $IP6KERNEL && ! $PRINT_ONLY; then
+ [[ -f /etc/soii.key ]] &&
+ sysctl -q "net.inet6.ip6.soiikey=$(</etc/soii.key)"
+fi
# If we were invoked with a list of interface names, just reconfigure these
# interfaces (or bridges), add default routes and return.