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

Diff for /src/etc/netstart between version 1.210 and 1.211

version 1.210, 2020/12/21 16:52:49 version 1.211, 2020/12/23 17:22:07
Line 27 
Line 27 
 # Parse and "unpack" a hostname.if(5) line given as positional parameters.  # Parse and "unpack" a hostname.if(5) line given as positional parameters.
 # Fill the _cmds array with the resulting interface configuration commands.  # Fill the _cmds array with the resulting interface configuration commands.
 parse_hn_line() {  parse_hn_line() {
         local _af=0 _name=1 _mask=2 _bc=3 _prefix=2 _c _cmd _prev _daddr          local _af=0 _name=1 _mask=2 _bc=3 _prefix=2 _c _cmd _prev _daddr _dhcp _i
         set -A _c -- "$@"          set -A _c -- "$@"
         set -o noglob          set -o noglob
   
Line 63 
Line 63 
                 _c[_name]="${_c[_name]} $_daddr"                  _c[_name]="${_c[_name]} $_daddr"
                 _cmds[$_prev]="${_c[@]}"                  _cmds[$_prev]="${_c[@]}"
                 ;;                  ;;
         dhcp)   _c[0]="ifconfig $_if"          dhcp)   unset _c[0]
                 ((${#_c[*]} > 1)) && _cmds[${#_cmds[*]}]="${_c[@]}"                  _i=1
                 _cmds[${#_cmds[*]}]="dhclient $_if"                  while [[ ${_c[$_i]} == @(-c|-d|-i|-n|-r|-v) ]]; do
                           if [[ ${_c[$_i]} == @(-c|-i) ]]; then
                                   _dhcp[${#_dhcp[*]}]=${_c[$_i]}
                                   unset _c[$_i]
                                   (( _i++ ))
                           fi
                           _dhcp[${#_dhcp[*]}]=${_c[$_i]}
                           unset _c[$_i]
                           (( _i++ ))
                   done
                   ((${#_c[*]} > 0)) && _cmds[${#_cmds[*]}]="ifconfig $_if ${_c[@]}"
                   _cmds[${#_cmds[*]}]="dhclient ${_dhcp[@]} $_if"
                 V4_DHCPCONF=true                  V4_DHCPCONF=true
                 ;;                  ;;
         '!'*)   _cmd=$(print -- "${_c[@]}" | sed 's/\$if/'$_if'/g')          '!'*)   _cmd=$(print -- "${_c[@]}" | sed 's/\$if/'$_if'/g')

Legend:
Removed from v.1.210  
changed lines
  Added in v.1.211