handle "inet autoconf" in ramdisk, same as /etc/netstart
authorsthen <sthen@openbsd.org>
Mon, 9 Aug 2021 13:56:17 +0000 (13:56 +0000)
committersthen <sthen@openbsd.org>
Mon, 9 Aug 2021 13:56:17 +0000 (13:56 +0000)
ok florian deraadt

distrib/miniroot/install.sub

index 8a71dc5..d09093b 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/ksh
-#      $OpenBSD: install.sub,v 1.1171 2021/08/06 07:06:34 sthen Exp $
+#      $OpenBSD: install.sub,v 1.1172 2021/08/09 13:56:17 sthen Exp $
 #
 # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
 # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -2355,6 +2355,11 @@ parse_hn_line() {
                return
                ;;
        inet)   ((${#_c[*]} > 1)) || return
+               if [[ ${_c[_name]} == autoconf ]]; then
+                       _cmds[${#_cmds[*]}]="ifconfig $_if ${_c[@]}"
+                       V4_AUTOCONF=true
+                       return
+               fi
                [[ ${_c[_name]} == alias ]] && _mask=3 _bc=4
                [[ -n ${_c[_mask]} ]] && _c[_mask]="netmask ${_c[_mask]}"
                if [[ -n ${_c[_bc]} ]]; then