Index: etc/netstart =================================================================== RCS file: /cvs/src/etc/netstart,v retrieving revision 1.216 diff -u -p -r1.216 netstart --- etc/netstart 2 Sep 2021 19:38:20 -0000 1.216 +++ etc/netstart 15 Nov 2021 23:20:00 -0000 @@ -71,6 +71,9 @@ parse_hn_line() { dhcp) _cmds[${#_cmds[*]}]="ifconfig $_if inet autoconf" V4_AUTOCONF=true ;; + down) _c[0]= + _ifup=down + ;; '!'*) _cmd=$(print -- "${_c[@]}" | sed 's/\$if/'$_if'/g') _cmds[${#_cmds[*]}]="${_cmd#!}" ;; @@ -118,6 +121,7 @@ vifscreate() { ifstart() { local _if=$1 _hn=/etc/hostname.$1 _cmds _i=0 _line _stat set -A _cmds + _ifup=up # Interface names must be alphanumeric only. We check to avoid # configuring backup or temp files, and to catch the "*" case. @@ -145,6 +149,8 @@ ifstart() { while IFS= read -- _line; do parse_hn_line $_line done <$_hn + + _cmds[${#_cmds[*]}]="ifconfig $_if $_ifup" # Apply the interface configuration commands stored in _cmds array. while ((_i < ${#_cmds[*]})); do Index: share/man/man5/hostname.if.5 =================================================================== RCS file: /cvs/src/share/man/man5/hostname.if.5,v retrieving revision 1.77 diff -u -p -r1.77 hostname.if.5 --- share/man/man5/hostname.if.5 17 Jul 2021 15:28:31 -0000 1.77 +++ share/man/man5/hostname.if.5 15 Nov 2021 23:20:01 -0000 @@ -57,6 +57,9 @@ the administrator should not expect magi and the per-driver manual pages to see what arguments are permitted. .Pp +Interfaces are implicitly configured to be brought up and running. +This behaviour can be disabled by adding a line containing down to the file. +.Pp Arguments containing either whitespace or single quote characters must be double quoted. For example: