[BACK]Return to netstart CVS log [TXT][DIR] Up to [local] / src / etc

Diff for /src/etc/netstart between version 1.218 and 1.219

version 1.218, 2022/06/26 09:36:13 version 1.219, 2022/07/03 12:14:36
Line 11 
Line 11 
         exit 1          exit 1
 }  }
   
   # Test the first argument against the remaining ones, return success on a match.
   isin() {
           local _a=$1 _b
   
           shift
           for _b; do
                   [[ $_a == "$_b" ]] && return 0
           done
           return 1
   }
   
 # Echo file $1 to stdout. Skip comment lines. Strip leading and trailing  # Echo file $1 to stdout. Skip comment lines. Strip leading and trailing
 # whitespace if IFS is set.  # whitespace if IFS is set.
 # Usage: stripcom /path/to/file  # Usage: stripcom /path/to/file
Line 94 
Line 105 
 }  }
   
 # Create interfaces for network pseudo-devices referred to by hostname.if files.  # Create interfaces for network pseudo-devices referred to by hostname.if files.
 # Usage: vifscreate  # Optionally, limit creation to given interfaces only.
   # Usage: vifscreate [if ...]
 vifscreate() {  vifscreate() {
         local _vif _hn _if          local _vif _hn _if
   
Line 106 
Line 118 
                         # loopback for routing domain is created by kernel                          # loopback for routing domain is created by kernel
                         [[ -n ${_if##lo[1-9]*} ]] || continue                          [[ -n ${_if##lo[1-9]*} ]] || continue
   
                           if (($# > 0)) && ! isin $_if "$@"; then
                                   continue
                           fi
   
                         if ! ifcreate $_if; then                          if ! ifcreate $_if; then
                                 print -u2 "${0##*/}: create for '$_if' failed."                                  print -u2 "${0##*/}: create for '$_if' failed."
                         fi                          fi
Line 313 
Line 329 
   
 # If we were invoked with a list of interface names, just reconfigure these  # If we were invoked with a list of interface names, just reconfigure these
 # interfaces (or bridges), add default routes and return.  # interfaces (or bridges), add default routes and return.
   # Create virtual interfaces upfront to make ifconfig commands depending on
   # other interfaces, e.g. "patch", work regardless of in which order interface
   # names were specified.
 if (($# > 0)); then  if (($# > 0)); then
           vifscreate "$@"
         for _if; do ifstart $_if; done          for _if; do ifstart $_if; done
         defaultroute          defaultroute
         return          return

Legend:
Removed from v.1.218  
changed lines
  Added in v.1.219